Hey hiroyone, thanks for reading!
Thankfully we didn't have a whole lot of tests to convert (maybe 3 test files) so it was really quite easy. I can imagine how difficult it could be if you have a large test suite. We simply looked at each test in Cypress and mimicked the steps in Playwright. For example:
- Go to x domain
- Click y button
- Check the z page is now displayed
Of course, the API and syntax is different so the first thing to do is to learn how to write tests in Playwright via their docs, you'll then be a lot more comfortable when migrating.
Also, there's no need to convert all Cypress tests right away, it's perfectly fine to have both Cypress and Playwright live alongside for a while and migrate one test file at a time. You'll really start to see how much more robust Playwright is.
I just published this article which you can look to for some tips and best practices: cathalmacdonnacha.com/playwright-e2e-testing-tipsβ¦
Hope that helps!