Sometimes, but only sometimes, we have to do certain things that don't work so well in Cypress... like switching domains. There are workarounds but what should we do if we can't apply them? Switch to another E2E framework? Definitely no, but maybe we can "borrow" some of their functionalities.
In this talk, I will show you how to integrate Playwright into Cypress to navigate to an OAuth2 server and login. You will also see the new cy.session command in action which will significantly improve the speed of tests that require authentication.
Source Code Repository: https://github.com/rainerhahnekamp/cypress-and-playwright