From POM to end-to-end purchase flows. Here's what a week of consistent practice looks like.
Last post I was figuring out constructor(private page: Page) and why classes beat functions for automation. Today I shipped a complete e-commerce test suite.
What's new since then:
- Refactored 5 login tests into a single LoginPage class -- no more repeated page.fill() calls. One loginPage.login() handles it all.
- Created CartPage.ts with generic methods like addToCart(dataTestId) using template literals -- one method works for any product.
- Split test files by functionality -- swag-labs-login.spec.ts and swag-labs-cart.spec.ts. Same pattern you'd see in a real enterprise repo.
- Built a full purchase flow test -- 15 steps from login to add to cart to checkout to fill shipping info to finish to verify "Thank you for your order!" to return to inventory. End-to-end in under 10 seconds.
- Added fillFirstnameLastnameZip() to the POM -- keeps checkout logic encapsulated while the test stays readable.
Current score: 8 tests, 2 Page Objects, 20/20 CI/CD passes on GitHub Actions. Every push auto-runs in ~90 seconds.
The difference between "I know Playwright" and "I can automate a business flow" is about 50 commits. I'm past the tutorial phase now -- this is framework building.
Repo: github.com/fede3mmanuel/qa-automation-practice
What was your "this clicked" moment in automation?
#QAAutomation #Playwright #TypeScript #TestAutomation #PageObjectModel #SoftwareTesting #CICD #GitHubActions

