Open izotomas opened 4 years ago
Hi I'm using spectron on webdriverIO and try to avoid client.pause() method to wait and used client.waitForExist, waitForWindowLoading, waitUnitlText but the applicaation closes very quick and I doesnt want to pass implicit wait
can some one guide towards right direction to achieve it?
@izotomas How do you run your tests on the command line? Please give me the exact command that you are using.
@hbenl well, since the test explorer can't run them...all the time!
$ mocha --timeout 3000000 --require ts-node/register e2e/**/*.spec.ts
I've been using this extension for over a year now and had no problems with it until i started work on this electron project...
I even tried to setup a fresh electron project (suspecting that it might be sth with our project config) to see how that goes but it still fails with the same issue.
I'll try to reproduce this - could you upload your fresh electron project to Github? Or alternatively point me to the description you used for setting it up?
there you go: spectron-mocha-explorer
Thanks, I guess that you have to run npm start
in a terminal (and keep it running) before you start the tests (either on the command line or in Test Explorer).
When I try to run the tests without running npm start
I get the same error message as you do - both in the command line and in Test Explorer.
When I run npm start
first and then run the tests, they work (well, one of them succeeds and one of them fails, but they are both executed) both in the command line and in Test Explorer.
Did you perhaps assume that the Mocha Explorer would automatically run npm start
for you? It doesn't (just like Mocha doesn't).
Does it work for you now?
this is my mocha config:
and this is mochaExplorer config:
when i'm running e2e test through command line, tests do run, however, explorer fail to execute them with following error: