action #163946
opencoordination #163919: [epic] Create automation setup for testing Agama
Integrate Puppeteer script with the Page Object Model (POM)
0%
Description
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 somehow to export the new classes created for POM in similar fashion and establish our locators as properties of those classes, refers to https://www.typescriptlang.org/docs/ for finding the correct syntax in TypeScript.
Check out this presentation from QE Yam Workshop 2024 to avoid the use of inheritance with POMs, but I guess at this point we don't need composition.
Updated by JERiveraMoya 12 days ago
- Subject changed from POM to Integrating Puppeter script with the Page Object Model (POM)
- Description updated (diff)
- Status changed from New to Workable
Updated by JERiveraMoya 12 days ago
- Subject changed from Integrating Puppeter script with the Page Object Model (POM) to Integrate Puppeteer script with the Page Object Model (POM)