-
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
Migrate list block test to Playwright #41555
Conversation
Size Change: 0 B Total Size: 1.25 MB ℹ️ View Unchanged
|
The e2e test passes on Github-Actions, but when I run it on my machine some tests fail. ( tests with names starting with "should undo asterisk transform with backspace" ) Also, it does not happen on my old machine (Mac Book Pro 2015). If I add |
ff20239
to
cb2cb81
Compare
Hi, thanks for the PR! Please follow the best practices while you're at it, especially with the part of using role selectors, so that we can keep the utils as simple to follow as possible 👍. While normally I think using snapshots is acceptable, this test has too many snapshots though maybe just inline them using Also, don't forget to remove the original test file and its snapshots too :)! |
Thanks for the review. |
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 working on this! Tests are looking good! There are some minor issues where we can follow the best practices to make it more reliable though.
page, | ||
} ) => { | ||
await page.locator( 'role=button[name="Add default block"i]' ).click(); | ||
await page.evaluate( () => delete window.requestIdleCallback ); |
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.
Why?
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.
I think this test is for environments that do not have requestIdleCallback.
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.
I see. Now that we're using Playwright, I think we can just remove this and enable running Safari for the test suite.
However, we don't have the necessary architecture for that yet. So I guess we can let this pass for now.
This code should probably stay in unit tests though, not sure why it's in e2e tests.
8d8e9df
to
6a3eb63
Compare
5d5b78e
to
efc4454
Compare
@kevin940726 I've fixed it, can you please check? |
Oops! I totally missed the notification! I'll review it today 🙇♂️ |
Hi! Did you see #41555 (comment) and #41555 (comment)? Other than that this looks pretty awesome! |
Thanks! |
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! Thanks a lot!
There's a conflict, we can merge this after resolving it! 💯 |
a5bedaa
to
0f50011
Compare
Thanks for all your reviews!!! |
Why have all snapshots be inlined? This has now become a pain to update! It's no longer possible to update the snapshots with the |
Yeah, it'd be ideal if we could use However, I don't think it's that much of a pain though. It's slightly inconvenient, but not that bad IMO. Overusing snapshots seems like a bigger problem to me. IMHO, most existing snapshot tests are there mainly because we don't have other more helpful tools, and snapshot is the easiest and fastest. Now that Playwright has all these advanced assertions, I hope that we can start moving away from snapshots (if there's a better alternative). |
@kevin940726 Unless you change the list block and all these are invalidated. |
What?
Part of #38851. Migrate list.test.js to Playwright.
Why?
See this post for an overview of the migration.
How?
By following the migration guide.
Testing Instructions