checkly / headless-recorder

Chrome extension that records your browser interactions and generates a Playwright or Puppeteer script.
https://checklyhq.com/headless-recorder
MIT License
15.03k stars 722 forks source link

chore: DRY up the two codegen subclasses #99

Closed paulirish closed 4 years ago

paulirish commented 4 years ago

Description

I saw https://github.com/checkly/puppeteer-recorder/pull/98 and was interested. I saw that there was barely any difference between the PPTR and PW codegen files so I tried my hand at moving the implementation back into the base class to get some Dont Repeat Yourself goodness.

also, this is a PR against #98.. Tho, if you want to merge 98 first, I can change the merge target to master.

For reviewing it might be useful to compare this branch to master. There you can see the codegen base class edits a bit more clearly.

Type of change

How Has This Been Tested?

Ran the existing tests

Checklist:

tnolet commented 4 years ago

@paulirish thanks for chipping in here. Much appreciated! @maxigimenez Is the driving force here so we will review and follow up ASAP.

maxigimenez commented 4 years ago

Thanks @paulirish!, LGTM 👍