Objective
What to automate
Authenticate through the API, reuse the session in Playwright, intercept the orders API with HTTP 500, and verify the visible error state.
Preconditions and test data
Preconditions
- Use a fresh isolated Practice Lab browser context.
- Open the fixture identified by FX-AUTH-001, FX-STORE-001.
Test data
standard_userPractice@123mock status: 500
Expected result
The browser is authenticated without UI login and Order history renders its assertion-ready 500 error state.
Progressive hints
Hint 1
Create the session and authenticate in APIRequestContext.
Hint 2
Export or transfer the resulting cookie into the browser context.
Hint 3
Route only the orders request and fulfil with the API error envelope plus status 500.
I’ve tried it — show solution
- Create the session and authenticate in APIRequestContext.
- Export or transfer the resulting cookie into the browser context.
- Route only the orders request and fulfil with the API error envelope plus status 500.