Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shouldNotExist passes when it should fail #20

Open
dereke opened this issue Jan 23, 2016 · 2 comments
Open

shouldNotExist passes when it should fail #20

dereke opened this issue Jan 23, 2016 · 2 comments

Comments

@dereke
Copy link
Member

dereke commented Jan 23, 2016

when you are checking that something does not exist:

browser.find('.irrelevant-option').shouldNotExist()

but it is dependent on a previous action making it display in the first place:

browser.find('.show').click().then(function(){
  return browser.find('.irrelevant-option').shouldNotExist();
})

The assertion will often pass as the browser has not had a chance to render the previous action (which erroneously displays the irrelevant option). Therefore I think shouldNotExist should be run inside a setTimeout 0. This seems to fix the issue in my testing.

@refractalize
Copy link
Member

perhaps shouldDisappear() ? So we first check that it exists, then ensure that it disappears.

@dereke
Copy link
Member Author

dereke commented Apr 19, 2016

yeah that might be a good option actually!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants