Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Issue 3578 expected conditions #4006

Merged
merged 2 commits into from
Jan 27, 2017
Merged

Issue 3578 expected conditions #4006

merged 2 commits into from
Jan 27, 2017

Conversation

tilmanschweitzer
Copy link
Contributor

@tilmanschweitzer tilmanschweitzer commented Jan 24, 2017

Add error handler falseIfMissing to all expected conditions that depend
on the presence of an element.

Expected conditions check the presence of an element before other checks,
but when an element is removed exactly in the moment after the isPresent
and before isDisplayed in visibilityOf the condition used to fail.

This solution does not handle missing elements in (isEnable, isDisplayed, isSelected) and focused only on expected conditions (see
#3972)

This problem was also referenced in
#3578.

Tests

Add test cases to reproduce the missing element race conditions possible in
expected condition methods visibilityOf, textToBePresentInElement,
textToBePresentInValue and elementToBeClickable.

See failing tests before implementation: https://circleci.com/gh/tilmanpotthof/protractor/14

…itions

Add test cases to reproduce the missing element race conditions possible in
expected condition methods `visibilityOf`, `textToBePresentInElement`,
`textToBePresentInValue` and `elementToBeClickable`.

Issue is referenced in
#3578
#3777
Add error handler `falseIfMissing` to all expected conditions that depend
on the presence of an element.

Expected conditions check the presence of an element before other checks,
but when an element is removed exactly in the moment after the `isPresent`
and before `isDisplayed` in `visibilityOf` the condition used to fail.

This solution does not handle missing elements in (`isEnable`, `isDisplayed`, `isSelected`) and focused only on expected conditions (see
#3972)

This problem was also referenced in
#3578.
@heathkit heathkit merged commit 40bbeca into angular:master Jan 27, 2017
@heathkit
Copy link
Contributor

Thanks so much for this! Especially for including test cases!

@tilmanschweitzer
Copy link
Contributor Author

@mgiambalvo Thanks for merging!

igniteram pushed a commit to igniteram/protractor that referenced this pull request Feb 21, 2017
…ibility (angular#4006)

Add test cases to reproduce the missing element race conditions possible in
expected condition methods `visibilityOf`, `textToBePresentInElement`,
`textToBePresentInValue` and `elementToBeClickable`.

Add error handler `falseIfMissing` to all expected conditions that depend
on the presence of an element.

Expected conditions check the presence of an element before other checks,
but when an element is removed exactly in the moment after the `isPresent`
and before `isDisplayed` in `visibilityOf` the condition used to fail.

This solution does not handle missing elements in (`isEnable`, `isDisplayed`, `isSelected`) and focused only on expected conditions (see
angular#3972)

This problem was also referenced in
angular#3578 and
angular#3777
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants