-
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
E2E: Fix draggable block tests #43739
Conversation
Size Change: -17 B (0%) Total Size: 1.25 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.
Changes LGTM!
Let's hope that this change is enough to fix the test flakiness.
packages/e2e-tests/specs/editor/various/draggable-block.test.js
Outdated
Show resolved
Hide resolved
@@ -7,15 +7,14 @@ import { | |||
deactivatePlugin, | |||
activatePlugin, | |||
showBlockToolbar, | |||
setBrowserViewport, | |||
waitForWindowDimensions, | |||
clickBlockAppender, | |||
} from '@wordpress/e2e-test-utils'; | |||
|
|||
describe( 'Draggable block', () => { | |||
// Tests don't seem to pass if beforeAll and afterAll are used. |
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.
Reminder to remove this comment before merging :)
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.
done, thank you!
8877a24
to
7ec02bf
Compare
It still seems to be failing. The test seems to not add any blocks at all, so I wonder why that is. It currently follows the same flow as many other tests by using the Perhaps there's an issue with |
Until recently, that test was pressing The main issue here, as you also said, is that the snapshot being returned doesn't have any blocks:
A couple more interesting things that can be noted from the snapshot images taken on CI for the failed test:
Another thing that I noticed from the snapshots, is that the post ID always skip a number, i.e 151, 153, 155, 157 ... which suggest that there may be other posts created between each test? Is that because of other tests being run concurrently? In that case, could we see if running only this test spec changes anything? Or is this test spec somehow creating 2 new posts every time, instead of one (which could also explain why the new post is empty? Just a few wild guesses. |
This reverts commit 6f31f92.
This is now fixed by #43798 (the tests have been migrated to Playwright) |
What?
Closes #43737
This is an attempt to make the draggable block tests pass. I've noticed that before- and after- hooks were incorrectly used:
gutenberg-test-plugin-disables-the-css-animations
should not be in the beforeEach hook, andTesting Instructions
I've re-run E2E jobs 3 times to be sure this fixes the draggable block tests.