Migrating from Cypress to playwright - Phase 1 by hxrshxz · Pull Request #1460 · I-TECH-UW/OpenELIS-Global-2 · GitHub - Link to the PR 50% successfully migrated with all tests passing and working perfectly fine ( see attached video below in the PR)
-
Earlier, a lot of tests that kept failing in Cypress are now passing smoothly in Playwright. This is mainly because Playwright handles asynchronous actions more reliably, has better support for iframes, and offers a much smoother debugging experience. In Cypress, many tests failed because of timing issues, flaky behavior, or challenges with debugging, which made it tough to pinpoint the exact cause. Playwright’s improvements in these areas have made a huge difference, and the tests are now more stable and easier to manage
-
also Cypress is limiting us to test some cases as we are not using Playwright and could have been done if we were doinig so
-
Over the past few weeks, I’ve spent a lot of time at Open Elis testing with both Cypress and Playwright, and I’ve found that Playwright really stands out in areas like debugging, async/await handling, page object patterns, and iframe management. Cypress, on the other hand, has been more difficult to work with, especially because of issues like unreadable
.then
syntax, limited debugging support(removed VS code debugging as well), slow tests,no built-in trace or video detection for flaky tests which makes it hard for contributors as well to debug. and many more -
I’ve already migrated half of the tests (14 out of 30 files) to Playwright, and it’s been much easier to debug and maintain, especially as the project scales. With only 30% of the tests left in Cypress, I think now is the best time to complete the migration before adding more Cypress tests. as in the future it would be hard also objectively Playwright is much better than Cypres
-
I could either write more tests for Cypress if we decide to stick with it, or focus on finishing the migration to Playwright and then aim for 90%+ coverage during the GSoC period, which aligns with my university vacation so i would be able to dedicate my time on working on that (If i am selected :)) . I’d really appreciate the OpenElis community’s feedback on which direction to take, and I’ll follow whatever the majority prefers.
-
I think this is the right time otherwise it would be very difficult to migrate to playwright in the future.
-
it would be great if any admin/mentor could guide me what should i do next
-
Head on comparison -