chatcraft.org icon indicating copy to clipboard operation
chatcraft.org copied to clipboard

Generate tutorial screenshots or screencasts using tests

Open tarasglek opened this issue 1 year ago • 6 comments

This seems like it would enable us to kill 2 birds with one stone:

  1. UI test
  2. Produce screenshots for tutorials and videos

https://docs.cypress.io/guides/guides/screenshots-and-videos https://www.youtube.com/watch?v=hX9Br8QSYgc&t=391s

tarasglek avatar Aug 07 '23 11:08 tarasglek

I'm a huge fan of Playwright for e2e and visual testing vs. cypress.

humphd avatar Aug 07 '23 12:08 humphd

what's wrong with cypress here? Eg how can one be in favor of playwright

playwright is just a framework to control browser? cypress is much higher level

update: maybe i don't have playwright vs cypress right in my head

tarasglek avatar Aug 07 '23 13:08 tarasglek

Actually I think I got it right. https://www.linkedin.com/pulse/comprehensive-comparison-cypress-playwright-vane-terziski/

tarasglek avatar Aug 07 '23 13:08 tarasglek

I'm curious how you think about positioning of playwright vs cypress.

tarasglek avatar Aug 07 '23 13:08 tarasglek

I've had to use both a bunch, and I have often run into limitations with Cypress that I managed to fix easily with Playwright (e.g., testing auth flows with many redirects).

I think I've just come to appreciate the deep tooling support (e.g., time-travel UI Mode), how it easily integrates with CI (e.g., easily record videos on failures in GitHub Actions), and how they run their open source project (e.g., videos per release).

humphd avatar Aug 07 '23 13:08 humphd

if i understand it right, it basically it boils down to "once you hit a limit in cypress, you gotta switch tool", "playwright is low level to enough to let you do whatever"

tarasglek avatar Aug 07 '23 14:08 tarasglek