action #163946
Updated by JERiveraMoya about 2 months ago
#### Motivation For reusability and maintenability, but refers to refresh best practice regarding this design pattern https://ray.run/blog/mastering-poms for an example with Playwright. #### Acceptance criteria * **AC1**: Break down the current script to use POM with Puppeteer in TypeScript. #### Additional information This task is also pretty much independent of the other task in this epic to start to work on, in can be done in your local setup and based on the preliminary script done by the developer https://github.com/lslezak/agama/tree/master/puppeteer or even closer, because it is in TypeScript, then one I did based on that, https://github.com/jknphy/agama-puppeteer/blob/main/tests/test.ts Puppeteer doesn't offer specific documentation for POM, but you can check out the one for Playwright: https://playwright.dev/docs/pom It will be needed to somehow to export the new classes created for POM in similar fashion and establish stabilish our locators as properties of those classes, those, refers to https://www.typescriptlang.org/docs/ for finding the correct syntax in TypeScript. Check out Refer to this [presentation](https://confluence.suse.com/display/qasle/QE+Yam+Workshop+2024?preview=/1436352572/1533345989/Composition%20with%20Page%20Object%20Models.pdf) from QE Yam Workshop 2024 to avoid the use of inheritance with POMs, but I guess at this point we don't need composition.