replay
replay copied to clipboard
Improve e2e test coverage for stringified scripts
Combined with https://github.com/puppeteer/replay/issues/268 and https://github.com/puppeteer/replay/blob/main/test/lighthouse/lighthouse-e2e.test.ts#L131 we should create e2e tests that test the stringified output to make sure the scripts are actually executable. cc @jecfish @jrandolf
I think that's a good idea. I want to do something similar for Testing Library Recorder Extension. I've also thought about running Prettier and TypeScript on the emitted output and using snapshot to automate managing changes in output.
#329
Combined with #268 and https://github.com/puppeteer/replay/blob/main/test/lighthouse/lighthouse-e2e.test.ts#L131 we should create e2e tests that test the stringified output to make sure the scripts are actually executable. cc @jecfish @jrandolf
I have added a so-called "everything" test that tries to test every possible replay feature on a single site: https://github.com/puppeteer/replay/blob/main/test/everything.test.ts The site produces the log based on the actions and it's expected that any kind of runner results in the exactly same log. Still we need to add coverage for iframes and targets and re-package the test so that it can be easily integrated into other projects.