Fake Store Contract Drift on Unauthorized Login Probe
Med.CheckoutAPI
Task
Run GET /_api-sandbox/products/1 -> GET /_api-sandbox/carts/1 -> POST /_api-sandbox/auth/login and validate each step
Success
- Use Playwright request fixture/context for every API call
- Keep traffic on /_api-sandbox only
- Run strict order: GET /_api-sandbox/products/1 -> GET /_api-sandbox/carts/1 -> POST /_api-sandbox/auth/login
Rules
- No local mocks or off-target HTTP calls
- No reordered flow steps
- No status-only assertions for login
Mutation
- Read steps remain required before login
- Unauthorized login semantics are graded strictly
Hint 1
• Action: send GET /_api-sandbox/products/1 • Action: send GET /_api-sandbox/carts/1 • Action: send POST /_api-sandbox/auth/login
Hint 2
• Assertion: assert 200 (or another 2xx) response • Assertion: assert payload has numeric id • Assertion: assert payload contains id and non-empty products array
Hint 3
• Assertion: assert status 401 • Assertion: assert body contains "incorrect"
