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

Add some e2e tests #253

Closed
5 tasks
nicojs opened this issue Dec 14, 2022 · 1 comment Β· Fixed by #254
Closed
5 tasks

Add some e2e tests #253

nicojs opened this issue Dec 14, 2022 · 1 comment Β· Fixed by #254

Comments

@nicojs
Copy link
Contributor

nicojs commented Dec 14, 2022

Hi, it's me again πŸ™‹β€β™‚οΈ

How would you feel about adding some e2e tests using screenshot snapshots? This is my idea:

  • Add a testing harness with input directories where we run decktape on.
  • Add playwright as a dependency and open the pdfs in a browser using the workaround suggested by the playwright team
  • Open each page in the generated pdf and match the snapshots to the snapshot on the disk
  • Add a CI pipeline where we run these snapshot tests
  • Add a manual pipeline that can automatically update the snapshots, which you can efficiently run on a branch of your choice.

I use this approach in a couple of repositories, and it works great IMO. It would save you a lot of time as a maintainer and (hopefully) prevent regression.

@astefanutti
Copy link
Owner

That'd be awesome! It'll definitely help for non-regression testing all the plugins πŸ‘πŸΌ.

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 a pull request may close this issue.

2 participants