How da-francesco/apiwithplaywright works
This is a Playwright/TypeScript API automation framework for testing the Restful Booker API. Its main workflow is scenario tests using reusable fixtures and API clients to call the service, then checking responses with shared assertions and Zod schemas. The graph also preserves authentication, test data, environment configuration, and the documented positive, negative, and CRUD testing branches. Source excerpts show client and configuration details; several test and fixture relationships are based on the README, since those implementations were not sampled.
Main entry points: booking API scenarios · auth.client.ts Auth client · booking.client.ts Booking client · api.fixture.ts API fixture
Components 15
Test scenarios
- API scenarios
tests/api/booking - Positive tests
tests/api/booking - Negative tests
tests/api/booking/negative - Auth-negative tests
tests/api/booking/negative - CRUD workflow
tests/api/booking/workflows/booking-crud.spec.ts
API runtime
- API fixture
fixtures/api.fixture.ts - Auth client
clients/auth.client.ts - Booking client
clients/booking.client.ts
Response validation
- Booking schemas
schemas/booking.schema.ts - API assertions
utils/api.assertions.ts
Test support
- Environment config
config/environment.ts - Booking test data
data/booking.data.ts - Playwright config
playwright.config.ts
Other components
- Test author
- Restful Booker API
Connections 15
- Test author → API scenarios: defines scenarios
README.md - API scenarios → API fixture: uses fixtures
README.md - API fixture → Auth client: provides client
README.md - API fixture → Booking client: provides client
README.md - Auth client → Environment config: reads credentials
clients/auth.client.ts - Playwright config → Environment config: reads settings
playwright.config.ts - Booking client → Booking test data: uses booking type
clients/booking.client.ts - Auth client → Restful Booker API: requests token
clients/auth.client.ts - Booking client → Restful Booker API: sends booking requests
clients/booking.client.ts - Positive tests → API scenarios: covers positive cases
README.md - Negative tests → API scenarios: covers invalid cases
README.md - Auth-negative tests → Auth client: checks authentication
README.md - CRUD workflow → Booking client: runs operations
README.md - API scenarios → Booking schemas: validates responses
README.md - API scenarios → API assertions: checks responses
README.md