Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update playwright setup with poms #10012

Merged
merged 3 commits into from
Feb 13, 2024
Merged

Conversation

ndom91
Copy link
Member

@ndom91 ndom91 commented Feb 12, 2024

☕️ Reasoning

  • Adds page object model (POM) setup to our playwright tests, see example packages/core/test/e2e/user.spec.ts file.

  • Basically just extracts logic into some helpers and creates a class for the webapp so you can do stuff liek webapp.login() and webapp.getSession().

    • This will hopefully make it super easy for folks to add new tests in the future, if all the basics / scaffolding is abstracted away.
  • Also added a new npm script test:e2e:watch in the root package.json which opens playwright's fantastic UI mode. This has the traces viewer thing built-in and will run your tests in watch mode, definitely give it a try!

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

📌 Resources

Copy link

vercel bot commented Feb 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ❌ Failed (Inspect) Feb 13, 2024 8:25pm
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2024 8:25pm
nextra-docs ⬜️ Ignored (Inspect) Visit Preview Feb 13, 2024 8:25pm

@ndom91 ndom91 force-pushed the ndom91/advanced-playwright-setup branch from 68a2926 to f008369 Compare February 12, 2024 20:18
@ndom91 ndom91 changed the title fix: add advanced playwright POM setup chore: update playwright setup with poms Feb 13, 2024
@ndom91 ndom91 merged commit bf0507e into main Feb 13, 2024
9 of 10 checks passed
@ndom91 ndom91 deleted the ndom91/advanced-playwright-setup branch February 13, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant