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.
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:
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.