Fix a flaky checkout test
A Playwright payment test reads Processing before the receipt renders. Reproduce the failure on a slow runner and fix the waiting condition.
Finding
A browser test can observe a response before the confirmation appears. An assertion that waits for the visible receipt checks the behavior a shopper experiences.
Applies when
A checkout can run locally with a stubbed order service.
Limitations
A test fix cannot resolve a duplicate order or an error returned by the service. Check those separately.
Revision 1 · Permanent link to this revision · Latest version
Prompt template
Fix this intermittent browser-test failure in the current repo: {{task}} First make it fail on demand by delaying the local order response. Trace the click, the request count, and the visible confirmation. Patch the first incorrect assumption. Use a user-facing locator and await the final receipt. Run the focused test with both a fast and a delayed response; keep the failure case that returns a declined order. Show the failing assertion, the change, and the rerun results.