replay icon indicating copy to clipboard operation
replay copied to clipboard

Improve e2e test coverage for stringified scripts

Open OrKoN opened this issue 2 years ago • 2 comments

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

OrKoN avatar Aug 23 '22 07:08 OrKoN

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.

nickserv avatar Aug 23 '22 07:08 nickserv

#329

0373501775 avatar Oct 08 '22 15:10 0373501775

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

Vicotpf avatar Oct 20 '22 18:10 Vicotpf

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.

OrKoN avatar Oct 27 '22 13:10 OrKoN