-
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 media inserter drag-and-dropping e2e test #50740
Conversation
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 PR! Code LGTM 👍!
It still bugs me why sometimes the inserter stays open though 🤔 . After dropping the image, the inserter should close, that's a feature I believe. I'm afraid that it might be an actual bug. Or maybe it's just that Playwright sometimes runs too fast before waiting for the inserter to be closed? Maybe we can add a waiting assertion and see if it fixes the issue. If it doesn't, I agree we can just land this and try to find a solution afterward.
Size Change: 0 B Total Size: 1.39 MB ℹ️ View Unchanged
|
@kevin940726, if you try that process manually, the inserter stays open. At least, that's what happens for media drag-and-drop. It gets closed when drag-and-dropping the block because the newly inserted block gets the focus.
I think we should add the keep the check in any case. Seems logical when dealing with toggle buttons. ScreenshotCleanShot.2023-05-18.at.17.40.40.mp4 |
…dd/static-closures * 'trunk' of https://github.com/WordPress/gutenberg: (26 commits) Add transparent outline to input control BackdropUI focus style. (#50772) Added wrapper element for RichText in File block (#50607) Remove the experimental flag of the command center (#50781) Update the document title in the site editor to open the command center (#50369) Remove `unwrap` from transforms and add `ungroup` to more blocks (#50385) Add new experimental version of DropdownMenu (#49473) Force display of in custom css input boxes to LTR (#50768) Polish experimental navigation block (#50670) Support negation operator in selectors in the Interactivity API (#50732) Minor updates to theme.json schema pages (#50742) $revisions_controller is not used. Let's delete it. (#50763) Remove OffCanvasEditor (#50705) Mobile - E2E test - Update code to use the new navigateUp helper (#50736) Try: Smaller external link icon (#50728) Block Editor: Remove unused 'useIsDimensionsSupportValid' method (#50735) Fix flaky media inserter drag-and-dropping e2e test (#50740) docs: Fix change log typo (#50737) Edit Site: Fix `useEditedEntityRecord()` loading state (#50730) Fix labelling, description, and focus style of the block transform to pattern previews (#50577) Fix Global Styles sidebar block selection on zoom out mode (#50708) ...
@Mamaduka Oops, yep! You're right! I was mistaken 🙈. Thanks! |
What?
Fixes #50325.
PR fixes flaky "can be replaced by dragging-and-dropping images from the inserter" e2e test.
Why?
A consecutive call to
openMediaTab
will close the block inserter if it's open, and block library locators will fail. The first test assertion closes the inserter sometimes and allows the test to pass.The test trace from this run can be used to confirm my theory - https://github.com/WordPress/gutenberg/actions/runs/5013447893.
How?
I adjust the logic in
openMediaTab
to avoid accidentally closing the inserter.Testing Instructions
openMediaTab
call below the first one.