Test your checkout, every day
Checkout breaks quietly: a renamed button, a payment form that moved into an iframe, a total that’s off. This is a real checkout test TestWatch wrote for the open-source demo shop, and what happened when we broke the shop.
The test it wrote
await test.step('Check out and pay with test card', async () => {
await page.getByRole('link', { name: 'Check out' }).click();
await page.getByRole('textbox', { name: 'Street address' }).fill('123 Main St');
await page.getByRole('textbox', { name: 'City' }).fill('Anytown');
await page.getByRole('textbox', { name: 'Postcode' }).fill('12345');
const paymentFrame = page.locator('iframe[title="Secure card payment input frame"]').contentFrame();
await paymentFrame.getByRole('textbox', { name: 'Card number' }).fill('4242 4242 4242 4242');
await paymentFrame.getByRole('textbox', { name: 'Expiration (MM / YY)' }).fill('12/28');
await paymentFrame.getByRole('textbox', { name: 'CVC' }).fill('123');
await page.getByTestId('place-order').click();
});
await test.step('Verify order confirmation and total', async () => {
await expect(page.getByText('Thanks! Your order has been placed.')).toBeVisible();
await expect(page.getByTestId('order-total')).toHaveText('$21.00');
});
The card form lives in an iframe, like Stripe’s; the test reaches into it with contentFrame(). The last line checks the exact total, product plus shipping.
A passing run, with no AI calls
- Sign in as the 2FA shopper310 msPassed
- Open the Waterproof Notebook and add one to the cart130 msPassed
- Check out and pay with test card185 msPassed
- Verify order confirmation and total65 msPassed
3 October 2026: 0 AI calls on this run.
When the page changed
We renamed the shop’s “Add to cart” button and its test id. The run failed; TestWatch called it a page change and proposed one new locator. Nothing changed until a person approved it:
await page.getByTestId('add-to-cart').click();
await page.getByTestId('add-to-bag').click();
When the total was wrong
Then we made the shop leave out shipping ($21.00 became $16.00). That isn’t a page change, so TestWatch didn’t bend the test to match; it flagged the run for a person to decide.
Related
Start free See it step by step
Free: 5 tests, 500 runs a month, 2 apps and one daily schedule. Unlimited teammates, no card.