Skip to content

Scenarios fail if restart=false. #564

@Rarcita

Description

@Rarcita

What are you trying to achieve?

Trying to run my tests with restart:false on config file.
All my tests passed, until I add that line to the config and then 90% of my scenarios fail. Again, if just that line, If I comment it they start passing again.
I grabbed two sample tests to try it out, and same thing happens.
See they are very basic

Scenario('Nightmare basic test yahoo', (I) => {
I.amOnPage('http://yahoo.com');
I.fillField('p', 'github nightmare');
I.click('#uh-search-button');

});

Scenario('Nightmare basic test google', (I) => {
I.amOnPage('http://google.com');
I.fillField('p', 'github nightmare');
});

What do you get instead?

If restart=false line is commented, they all passed.

yarn run v0.24.4
$ codeceptjs run --steps --verbose --debug --reporter mochawesome

Login
✓ Nightmare basic test yahoo (13644ms)
✓ Nightmare basic test google (4151ms)

2 passing (18s)

[mochawesome] Report JSON saved to /Users/Rarcita/Applications/NES/nes-e2e-tests/e2e-output/mochawesome.json

[mochawesome] Report HTML saved to /Users/Rarcita/Applications/NES/nes-e2e-tests/e2e-output/mochawesome.html

✨ Done in 22.13s.
✨ Done in 24.34s.

If restart=false is not commented, the first one fails (for this two samples. On my suite,most of them fail, but they will all pass if I comment out the line.

See yarn run v0.24.4

$ codeceptjs run --steps --verbose --debug --reporter mochawesome

Login

Error: Evaluation timed out after 30000msec. Are you calling done() or resolving your promises?

1) Nightmare basic test yahoo

✓ Nightmare basic test google (3125ms)

1 passing (34s)

1 failing

  1. Login: Nightmare basic test yahoo:

    [Wrapped Error] "Nothing responds to "goto""

Scenario Steps:

  • I.click("#uh-search-button") at Test.Scenario (test-e2e/tests/01_login/login_spec.js:76:5)

  • I.fillField("p", "github nightmare") at Test.Scenario (test-e2e/tests/01_login/login_spec.js:75:5)

  • I.amOnPage("http://yahoo.com") at Test.Scenario (test-e2e/tests/01_login/login_spec.js:74:5)

[mochawesome] Report JSON saved to /Users/Rarcita/Applications/NES/nes-e2e-tests/e2e-output/mochawesome.json

[mochawesome] Report HTML saved to /Users/Rarcita/Applications/NES/nes-e2e-tests/e2e-output/mochawesome.html

error Command failed with exit code 1.

> Provide test source code if related

```php
// paste test

Details

CodeceptJS version: 0.6.3
NodeJS Version: v6.10.3
Operating System: OSX Yosemite 10.10.5
Nightmare version:2.10.0
Configuration file:
helpers: {
Nightmare: {
url: process.env.CODECEPT_URL || 'http://google.com',
show: process.env.SHOW || false,
restart: false,
windowSize: '1280x1024',
openDevTools: { detach: true },
gotoTimeout: 90000
},

# paste suite config here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions