How takoua17/formationplaywrightbdd works
FormationPlaywrightBDD is a Playwright/Cucumber BDD test framework for validating automationexercise.com through UI scenarios and a separate account API scenario. The main UI path runs from Gherkin features through Cucumber step definitions and page objects to browser actions; hooks manage browser lifecycle and capture artifacts. Product, cart, checkout, and authentication are distinct scenario domains, with YAML-backed configuration as an internal layer. The README documents these capabilities; edges for unsampled scenario files are limited to its architecture description and indexed references.
Main entry points: ui UI step definitions · connexionPage.ts Login / logout · checkoutPage.ts Checkout & payment · pageFixture.ts Page fixture
Components 18
BDD Scenarios
- UI features
src/features/ui - Account feature
src/features/api/compte.feature
Scenario Execution
- UI step definitions
src/steps/ui - API step definitions
src/steps/api/compteApistep.ts - Browser hooks
src/hooks/hooks.ts
UI Page Objects
- Base page helpers
src/pages/basePage.ts - Login / logout
src/pages/connexionPage.ts - Cart actions
src/pages/panierPage.ts - Product browsing
src/pages/produitPage.ts - Checkout & payment
src/pages/checkoutPage.ts
Account API
- Account API client
src/api/compteApi.ts
Runtime Support
- Page fixture
src/support/pageFixture.ts - YAML config loader
src/config/configLoader.ts - Runtime settings
src/config/config.yaml
Other components
- QA / BDD user
- Automation Exercise
- Playwright browser
- Account API service
Connections 25
- QA / BDD user → UI features: defines scenarios
README.md - QA / BDD user → Account feature: defines scenarios
README.md - UI features → UI step definitions: maps steps
README.md - Account feature → API step definitions: maps steps
- UI step definitions → Login / logout: calls actions
src/steps/ui/connexionSteps.ts - UI step definitions → Cart actions: calls actions
src/steps/ui/panierSteps.ts - UI step definitions → Product browsing: calls actions
src/steps/ui/panierSteps.ts - UI step definitions → Checkout & payment: calls actions
src/steps/ui/checkoutSteps.ts - UI step definitions → Page fixture: uses shared page
src/steps/ui/panierSteps.ts - API step definitions → Account API client: calls client
src/steps/api/compteApistep.ts - Login / logout → Base page helpers: extends helpers
src/pages/connexionPage.ts - Cart actions → Base page helpers: extends helpers
src/pages/panierPage.ts - Product browsing → Base page helpers: extends helpers
src/pages/produitPage.ts - Checkout & payment → Base page helpers: extends helpers
src/pages/checkoutPage.ts - Page fixture → Product browsing: types page reference
src/support/pageFixture.ts - Browser hooks → Page fixture: sets browser page
src/hooks/hooks.ts - Browser hooks → YAML config loader: reads settings
src/hooks/hooks.ts - YAML config loader → Runtime settings: loads YAML
src/config/configLoader.ts - Login / logout → YAML config loader: reads credentials
src/pages/connexionPage.ts - Checkout & payment → YAML config loader: reads payment settings
src/pages/checkoutPage.ts - Browser hooks → Playwright browser: launches browser
src/hooks/hooks.ts - Page fixture → Playwright browser: holds page
src/support/pageFixture.ts - Login / logout → Automation Exercise: automates login
- Checkout & payment → Automation Exercise: submits order
- Account API client → Account API service: sends account requests
src/api/compteApi.ts