How linkedinlearning/playwright-essential-training-abstractions-fixtures-and-complex-scenarios-4278224 works
This is a Playwright training repository, with a sample bagel-shop site and an automation suite demonstrating test data, page-object abstractions, fixtures, and complex scenarios. A typical workflow is to run a test against a configured browser and exercise a site or API; the README describes broader interception and mocking capabilities, but the sampled source does not show their wiring. Dashed, unverified links mark those gaps; test files themselves were not sampled.
Main entry points: tests Test scenarios · pages Page objects · bagel-shop Bagel-shop site · datafactory Test data
Components 26
Test workflows
- Test scenarios
tests - Auth setup
tests/auth.setup.ts - API scenarios
tests/api - Account scenarios
tests/account - Login scenarios
tests/login - Checkout scenarios
tests/checkout - Shop scenarios
tests/bagel-shop
Test abstractions
- Shared fixtures
lib/fixtures - Page objects
lib/pages - Login page
lib/pages/login/login.page.ts - Contact page
lib/pages/contact/contact.page.ts - Account page
lib/pages/account/account.page.ts - Messages page
lib/pages/account/messages.page.ts - Test data
lib/datafactory - User registration
lib/datafactory/register.ts - Message creation
lib/datafactory/messages.ts - Test helpers
lib/helpers
Sample application
- Bagel-shop site
bagel-shop - Home and promo
bagel-shop/js/main.js - Order and receipt
bagel-shop/js/order.js - Contact form
bagel-shop/js/contact.js - Menu page
bagel-shop/js/menu.js
Browser and API
- Playwright config
playwright.config.ts - Browser runtime
- Application API
Other components
- Test author
Connections 25
- Test author → Test scenarios: runs
README.md - Test scenarios → Playwright config: uses settings
- Test scenarios → Shared fixtures: uses fixtures
- Test scenarios → Page objects: uses abstractions
- Test scenarios → API scenarios: covers API
- Test scenarios → Account scenarios: covers accounts
- Test scenarios → Login scenarios: covers login
- Test scenarios → Checkout scenarios: covers checkout
- Test scenarios → Shop scenarios: covers shop
- Test scenarios → Auth setup: includes setup
- Page objects → Login page: includes
- Page objects → Contact page: includes
- Page objects → Account page: includes
- Page objects → Messages page: includes
- Test data → User registration: includes
- Test data → Message creation: includes
- User registration → Application API: posts registration
lib/datafactory/register.ts - Message creation → Application API: posts messages
lib/datafactory/messages.ts - Bagel-shop site → Home and promo: serves script
- Bagel-shop site → Order and receipt: serves script
- Bagel-shop site → Contact form: serves script
- Bagel-shop site → Menu page: serves script
- Playwright config → Browser runtime: configures projects
playwright.config.ts - Test scenarios → Browser runtime: exercises
- Test scenarios → Bagel-shop site: tests