Comments (30)
https://github.com/electron/electron-api-demos/blob/master/tests/index.js is a pretty good Spectron example to start from.
I tried AVA for a bit but it was quite slow to start up every time because it's doing so much transpilation.
from kap.
@zeke That should only be the first run. We cache everything. Unless you're using babel-register
, which circumvents our cache, but I don't see why babel-register
would be used here. Node.js 6 also improved require
time significantly, so should help. We're working on a promising solution: avajs/ava#1052.
from kap.
@sindresorhus sweet! I will give AVA another go.
from kap.
Hi guys,
I know a number of people have already tried to take on this PR.
I am a complete beginner when it comes to writing tests.
I've just added in a sample test to run and confirm that it is setup correctly.
I will probably be back in a bit to ask some questions.
Currently using the two packages Spectron and Ava as suggested from the original comment
Thanks
from kap.
Been using your app and it is very simple. It would mean great deal to me to contribute to this project. I've seen some of the people already added some tests but I'd like to add some more. And for now I'm learning examples of AVA and Spectron. Hope I can add some tests soon.
from kap.
Thanks for the link @zeke – will be needed since I never used Spectron 😅
Yeah, AVA takes some time to start – but it's awesome 😌 cc @sindresorhus
from kap.
I would like to start working on this. Maybe I can start doing tests in chunks and make pull requests for them?
from kap.
Awesome. I will start on this today then.
Also, do we have a preference on what test libraries / frameworks we use? I usually go with Jest due to Istanbul coverage reporting being built in, and mix Enzyme in for React component testing.
from kap.
Expect a PR for some tests soon 😄
from kap.
I highly suggest creating a markdown table with what you intended to cover with the tests, that way we have a better idea of what exactly we aim to cover @dhuang612 🙏 Thank you for bringing this issue back to life!
from kap.
Sounds amazing @hyalkaf 😄 You could write the first ones and then send a [WIP]
PR and then just keep adding the others 😄
from kap.
Any progress here ? 😄
Otherwise I would try to start on it. Is the decision on AVA now final or Spectron ?
from kap.
@fokusferit No progress. Feel free to take it on. AVA + Spectron. Example here: https://github.com/electron/spectron/blob/master/README.md#with-ava
from kap.
Has any progress been made on this yet? I'd like to start chunking away at this.
First time contributing to this project btw.
from kap.
That'd be fantastic @brodeynewman! There hasn't been any substantial progress on this, you can grab the latest version of Kap off master
, here's how to get set up: https://github.com/wulkano/kap/blob/master/contributing.md
from kap.
That makes sense, you can also look into AVA with Enzyme!
from kap.
I would prefer AVA and Enzyme. See: https://github.com/avajs/ava/blob/master/docs/recipes/react.md Make sure you install yarn install [email protected]
(latest version). For code coverage, see: https://github.com/avajs/ava/blob/master/docs/recipes/code-coverage.md
from kap.
@brodeynewman any progress on this? would love to be able to test changes in here
from kap.
okay,
So I got it setup in package.json and hooked it up to npm test.
When I setup the test.js page following this guide:
https://github.com/electron-userland/spectron#with-ava
I get the following error:
TypeError: Tests must have a title
So I opened up a new issue on spectron's repo
electron-userland/spectron#434
from kap.
never mind I understand my issue
from kap.
sent a PR could I get a review on work done so far?
from kap.
just wanted to send a quick update.
I have made the changes that the reviewer requested.
Right now circle ci is timing out on this ava test without ever running it.
The test passes both on my local machine, and when I push the commit to this repo.
Investigating into circle ci.
Included screenshots into my PR
from kap.
opened up an issue with this repo
electron-userland/spectron#439
https://github.com/electron-userland/spectron
still getting the same issue of having the test timeout when using ci
from kap.
been reviewing documents on spectron and ava to try and find the correct param I am missing to get this working on circleci. Since the no output for 10 minutes error means that the environment isn't being setup correctly.
So it seems like I need to start setting up some sort of way to fake the browser existing for the ci tests to pass?
I've been looking into this
https://blog.logrocket.com/introduction-to-headless-browser-testing-44b82310b27c/
and will need changes to be made to the config.yml
from kap.
I am basing my previous statement from this article available on electronjs which talks about headless testing and mentions circleci
https://electronjs.org/docs/tutorial/testing-on-headless-ci
currently reading through circleci docs
from kap.
Hello,
I have a question, could someone tell me if the circleci logs are saying anything?
The only response I am getting from that for my tests is a timeout which isn't a helpful message.
I understand that spectron has webdriverio as a wrapper so that should be enough to run it?
from kap.
Hey guys,
So a docker image needs to be setup to replicate the environment so that these tests can be run.
Here is an article about it from circleci
https://circleci.com/blog/docker-what-you-should-know/
https://circleci.com/docs/2.0/building-docker-images/
Basically tests can't be added until this is configured, that's why the timeouts have been happening.
Could you guys setup an electron docker and then I can get this test to pass and continue to work on others?
Here's an example of another github repo with working tests and their config.yml has a docker image setup for electron
https://github.com/CityOfZion/neon-wallet/blob/dev/.circleci/config.yml
Thanks guys
from kap.
I now have a better understanding of next steps. I'll get working on this and resubmit the pr
from kap.
Hi,
created PR #730 for this issue.
from kap.
added some more tests
from kap.
Related Issues (20)
- libwebp : Vulnerable Electron 13.6.9 found in Kap
- Unhandled Promise Rejection HOT 1
- Has Kap development been abandoned? HOT 5
- Does not show the UI, and doesn't show up in the menubar. HOT 1
- Unhandled Promise Rejection HOT 2
- Error on startup (M1 Mac)
- Directly Record Compressed
- Activation of Kap is slow with large displays HOT 4
- The background color of reduced size on white is pink-ish. HOT 1
- Add support for multiple loop types HOT 1
- Kap Behaves Unexpectedly when Magnification tool on MacOS is used.
- Dotted line shows at the bottom after convert. HOT 3
- Limiting In-app Navigation, Santizing Links, and Electron.js Version Upgrade
- Unhandled Promise Rejection Error: Cannot download "https://objects.githubusercontent.com/github-production-release-asset-2e65be/65411043/dc097279-94c4-4189-adf7-7eb46e2930a0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220303%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220303T202905Z&X-Amz-Expires=300&X-Amz-Signature=14ded9e5de067facf9d78c074c08405ca088590d94d4d27acf996a3251ce2927&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=65411043&response-content-disposition=attachment%3B%20filename%3DKap-3.5.4-mac.zip&response-content-type=application%2Foctet-stream", status 503: at ClientRequest.<anonymous> (/Applications/Kap.app/Contents/Resources/app.asar/node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js:213:34) at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:105:6816) HOT 1
- Support local Google Drive copy
- Crash on start M3 Pro HOT 6
- Contributing – running app locally by yarn start, but I can't allow recording permissions in the development HOT 5
- Option to Disable Overlay in Non-Recording Screen
- Unhandled Error
- After fresh installation, could not find the option "Select input device". After solved this issue, no Audio in playback.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kap.