hasura-auth icon indicating copy to clipboard operation
hasura-auth copied to clipboard

Playwright E2E tests to automate detection of login methods breakage

Open fungilation opened this issue 3 years ago • 0 comments

With #137 and frequent enough breakages on releases. hasura-auth can greatly benefit I believe with automated E2E tests. Playwright is the best I know and have used in doing most robust, fast E2E tests from FE as a user would see and interact, as Playwright uses headless and real browsers. (not drivers like Selenium or Cypress) It's an offshoot of Puppeteer which is Chrome only.

A skeleton FE app should include login page with all login methods and social auth providers. (maybe skip email as that requires reading emailed magic link outside the browser, or just use magic link directly without the email part)

Playwright steps would be simple per (social) login, authorizing on oauth provider page, and with test passing if redirectTo page as destination is reached with 200 status.

fungilation avatar Apr 07 '22 16:04 fungilation