-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fixing the flaky template editor mode test #40325
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
Merged
kevin940726
merged 2 commits into
trunk
from
fix/intermittent-post-editor-template-mode-test
Apr 14, 2022
Merged
Fixing the flaky template editor mode test #40325
kevin940726
merged 2 commits into
trunk
from
fix/intermittent-post-editor-template-mode-test
Apr 14, 2022
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size Change: +2.58 kB (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
kevin940726
approved these changes
Apr 14, 2022
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.
Thank you!
test/e2e/specs/editor/various/post-editor-template-mode.spec.js
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Type] Automated Testing
Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
[Type] Build Tooling
Issues or PRs related to build tooling
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extracted from #32765
Hopefully fixes #34805, fixes #38595, and fixes #38594.
What?
In the React 18 upgrade PR, I noticed that the template mode test is a bit flaky. The reason for that was that sometimes the template panel title is "Template", sometimes it's "Template: %template_name%" and when loading the sidebar, it can move from one to the other once the template is loaded. This PR solves the flakiness.
How?
Since the "expandTemplatePanel" is a generic function that should work across use-cases, it should be able to work no matter the current name of the template panel. This PR uses a Regex to do that.
Testing Instructions
Nothing to test, the playwright tests should be stable.