Repository navigation
Refactor preview e2e tests to use Playwright. - #41380
Conversation
|
Size Change: +1.13 kB (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
kevin940726
left a comment
There was a problem hiding this comment.
Thanks for working on this!
I left some suggestions about using Playwright-style assertions. Most of them are repetitive though, just want to make sure we catch everything 😆.
There are also some places where we're not appending the i flag to the names, let's remember to add them wherever they make sense ;)
kevin940726
left a comment
There was a problem hiding this comment.
Missing some i flag and some nitpicks. But overall it looks pretty good!
Remember to remove the original puppeteer test though! (We also have to remember to mention it in the migration guide 😅)
| await page.locator( 'role=button[name="Switch to draft"]' ).click(); | ||
|
|
||
| // Change the title. | ||
| await editorPage.type( '[aria-label="Add title"]', ' Draft' ); |
There was a problem hiding this comment.
Oh, I think the name is still Add title and the selector should work. The problem is that we're missing the "pressing OK in the dialog" action in Line 186. See my other comment there :)
Co-authored-by: Kai Hao <kevin830726@gmail.com>
Co-authored-by: Kai Hao <kevin830726@gmail.com>
Co-authored-by: Kai Hao <kevin830726@gmail.com>
Co-authored-by: Kai Hao <kevin830726@gmail.com>
Co-authored-by: Kai Hao <kevin830726@gmail.com>
Co-authored-by: Kai Hao <kevin830726@gmail.com>
Co-authored-by: Kai Hao <kevin830726@gmail.com>
Co-authored-by: Kai Hao <kevin830726@gmail.com>
|
Thanks for the reviews! I think I've addressed everything now 😅 |
kevin940726
left a comment
There was a problem hiding this comment.
Looks perfect! Thanks a lot 😍!
What?
Part of #38851. Migrate and refactor
preview.test.jsto Playwright. This suite has some known flaky tests so hopefully the migration fixes #37976 and #35387.Why?
See this post for an overview of the migration.
How?
By following the migration guide.
Testing Instructions
npm run test-e2e:playwright -- test/e2e/specs/editor/various/preview.spec.js
Screenshots or screencast