-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 the flaky site editor list view tests #51598
Fix the flaky site editor list view tests #51598
Conversation
Flaky tests detected in 52519f8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5296361738
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mamaduka Very sorry about that, I introduced the new list view tests. What a weird bug for sure. Had no idea we already had list view tests. Sometimes I am not a fan of our naming conventions.
If you can get the checks passing, LGTM. 👍
24a2fce
to
52519f8
Compare
No worries, @alexstine! Similar bugs are hard to catch locally, but at least we caught them early via CI. @ramonjd, what do you think about consolidating site editor list view tests in a single file? Happy to follow up in a separate PR. |
Size Change: 0 B Total Size: 1.4 MB ℹ️ View Unchanged
|
Great idea! That makes much more sense – I guess I expected the preferences pane to have more E2E tests 😄 Also thanks for offering to pick it up. |
What?
Fixes #51533.
The issue reported that the following assertion
await expect( openNavigationButton ).toBeFocused();
was failing on line 86 in the new site editor list view e2e tests -test/e2e/specs/site-editor/list-view.spec.js
.Why?
The editor preferences persist across the tests, and the "Always open list view" setting was "leaking" from the block list panel preferences tests.
How?
I added the cleanup code to the block list panel preferences test to turn off persisted list view after the tests are finished.
Testing Instructions
It's hard to reproduce the exact scenario when the test fails on CI, but you can add this code snippet at the beginning of the "ensures List View global shortcut works properly" test to confirm my theory.
Then run the tests.