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

Fix flakey test due to Javascript animation timing #2561

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mtaylorgds
Copy link
Contributor

The test fails intermittently with the error:

Capybara::ElementNotFound: Unable to find visible css ".action-content-block-update" within #<Capybara::Node::Element tag="div" path="/HTML/BODY[1]/SECTION[1]/MAIN[1]/DIV[1]/DIV[2]/DIV[1]/DIV[4]/DIV[1]/DIV[3]/DIV[2]/DIV[3]">

This seems to be because the expanding of the edition panel is not always completing before the check for the "content block update" element occurs. Adding the extra within selector for the .collapse.in classes to be present (which happens once the "expand" animation has completed) appears to at least make the test more reliable (I can't really be 100% sure it's completely resolved, but I've run the test dozens of times locally now without failure).

The test fails intermittently with the error:
```
Capybara::ElementNotFound: Unable to find visible css ".action-content-block-update" within #<Capybara::Node::Element tag="div" path="/HTML/BODY[1]/SECTION[1]/MAIN[1]/DIV[1]/DIV[2]/DIV[1]/DIV[4]/DIV[1]/DIV[3]/DIV[2]/DIV[3]">
```

This seems to be because the expanding of the edition panel is not
 always completing before the check for the "content block update"
 element occurs. Adding the extra `within` selector for the
 `.collapse.in` classes to be present (which happens once the "expand"
 animation has completed) appears to at least make the test more
 reliable (I can't really be 100% sure it's completely resolved, but
 I've run the test dozens of times locally now without failure).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants