Quest 03 / 03 · Quick build
Test a checkout demo with an order spending cap
- Playwright
- JavaScript
- browser testing
Why now TrueLayer says its UK food-ordering pilot lets customers authorize a Papa John's agent through a banking app and set a spending limit. Build a local demo that tests the cap as a rule, without connecting to a bank or submitting a payment.
Build it Create a mock order flow that reads product records from a small online-shop dataset and checks the order total against a user-entered cap. Use Playwright to test approval at the cap and rejection above it.
From the news
Tools
- Playwright
Playwright uses Apache-2.0 and can run locally without a product subscription. CI machines, hosted browsers and any AI service attached to its tools can have separate charges.
Data
- 🛒 Online Shop 2024 Kaggle
Use the shop's sample records to populate a mock cart for local checkout tests.
Steps
- Download the dataset and inspect its tables and columns before selecting product records for a mock cart.
- Build a local checkout page with a cart total, a user-entered spending cap, and a clear allow-or-block result.
- Keep the flow simulated: do not collect bank credentials or call a payment service.
- Write Playwright tests for an order at the cap, an order above the cap, and an empty cart.
Done when
- The browser tests allow a total at the cap and block a total above it.
- The empty-cart test reports a clear result, and the demo makes no payment or bank request.
