-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 flaky Site Editor URL navigation e2e test #60675
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
await expect( page ).toHaveURL( | ||
'/wp-admin/site-editor.php?postId=emptytheme%2F%2Fdemo&postType=wp_template_part&canvas=edit' | ||
); | ||
test.beforeEach( async ( { requestUtils } ) => { |
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.
This is the actual fix. The rest is just minor cleanup. I've removed unnecessary grouping.
Size Change: 0 B Total Size: 1.75 MB ℹ️ View Unchanged
|
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.
Switching to test.beforeEach
looks like a fairly innocuous change to me, and would be a simple revert if it winds up causing any further issues, so this looks good to try to me!
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.
LGTM as long as it fixes the issue 👍.
Using |
Thanks, everyone! |
The test is still flaky (#60678). Previously, it failed on the second run as well, and a report wasn't created. We can probably fix the flakiness by moving the deletion utility again, but there might be another cause for this. The original test was introduced a year ago, and it only recently became flaky. |
What?
PR fixes flaky 'Redirection after template creation' e2e tests.
Why?
I noticed it failed a few times on GitHub, and then I could consistently reproduce it locally. The
Demo
test post wasn't available based on failure traces.Recent failure report https://github.com/WordPress/gutenberg/actions/runs/8642543699
How?
I tried a few things, but using
test.beforeEach
works without a problem. Though I'm not entirely sure why 😅cc @kevin940726, @WunderBart
Testing Instructions