-
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 taxonomies flaky tests #35534
Fix taxonomies flaky tests #35534
Conversation
Size Change: 0 B Total Size: 1.07 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.
The change here looks seems logical.
The new selector is not found https://github.com/WordPress/gutenberg/pull/35534/checks?check_run_id=3867770004#step:6:60 🤔 |
Hi, @JustinyAhin The sector should be correct. The P.S. I changed that selector in #33545. |
Hey @Mamaduka |
It seems it's open but the categories are not loaded yet, maybe a missing waitForSelector somewhere? |
Yes, we could probably wait for
|
Most likely, this condition is true at the time test is trying to click on "Add new category." gutenberg/packages/editor/src/components/post-taxonomies/hierarchical-term-selector.js Lines 232 to 234 in 2078af7
I simulated this scenario and got the visually same result @JustinyAhin that check might help, so code waits a little more before |
@Mamaduka I think I might have one issue with my setup. I've just deleted my Gutenberg folder, clone and build again. But the input still have this class name: |
@JustinyAhin, sorry, I know this sounds silly, but can you check if the Gutenberg plugin is active on the test setup? It happened to me more than once 😅 |
🤦🏻♂️🤦🏻♂️ oh it was that 😅 |
@Mamaduka could you explain this a bit more for me please? |
@JustinyAhin it might take some time for |
@Mamaduka this is ready to go. Maybe you can look one last time? :) |
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.
Thanks for the ping, @JustinyAhin. I think this looks good 👍
Description
Fix for #35483.
The test fail was due to a wrong selector.
.editor-post-taxonomies__hierarchical-terms-input input[type=text]
was used before. This will look for a text input inside the element with the class.editor-post-taxonomies__hierarchical-terms-input
. While the input itself has this class name.How has this been tested?
Run
npm run test-e2e -- packages/e2e-tests/specs/editor/various/taxonomies.test.js
locally and check the changed test still passes.Use
for i in {1..5}; do npm run test-e2e -- packages/e2e-tests/specs/editor/various/taxonomies.test.js; done
to run the test file 5 times for instance.Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.js
files for terms that need renaming or removal).