The Scenario
Your company’s checkout flow has broken twice this month because frontend changes unexpectedly broke backend API calls. You need to write an automated End-to-End (E2E) test to prevent this.
The Brief
Write a Playwright (or Cypress) test script that navigates to an e-commerce site, adds a specific item to the cart, proceeds to checkout, fills out the shipping form, and verifies the final confirmation screen.
Deliverables
- The complete Playwright/Cypress test script
- An explanation of how to handle asynchronous flakiness (e.g., waiting for network requests or animations to finish before clicking)
- A brief strategy on how you would handle testing payment processing without charging real credit cards
Submission Guidance
E2E tests are notoriously flaky. Your test code should demonstrate best practices for waiting for elements to be actionable, rather than relying on arbitrary `sleep(5000)` commands.
Submit Your Work
Your submission is graded against the rubric on the right. If you pass, you get a public Badge URL you can share on LinkedIn. There is no draft save, so work offline first and paste your finished response here.