1Business context
Nova Shop is a direct-to-consumer online store. The business goal is conversion: get signed-in shoppers from browsing to a paid order with as little friction as possible, while applying coupons, tax and shipping correctly and protecting against bad payments.
Login with test users, search/filter/sort products, cart & coupons, a validated checkout, a declined card, order history with cancel and return, a store-manager role and a buggy build.
2Users & roles
- 👤 Shopper (demo_user) — browses, buys, cancels, returns and reorders
- 👤 Store manager (admin_user) — ships and delivers orders and decides returns
- 👤 Locked customer (locked_user) — must be blocked at login
- 👤 Slow-network customer (slow_user) — login takes ~3 s
- 👤 Buggy build (buggy_user) — the same shop with 5 seeded defects
3Modules & screens
| Screen | Route | What it does |
|---|---|---|
| Login | /shop | Username/password sign-in with validation and locked-account handling |
| Product catalogue | /shop/products | Search, category filters, in-stock filter and sort |
| Product detail | /shop/product/[id] | Description, reviews, stock limit and add to cart |
| Cart | /shop/cart | Quantities, line totals, coupons, tax and shipping maths |
| Checkout | /shop/checkout | Shipping details, shipping speed, card or cash on delivery |
| Order confirmation | /shop/checkout/complete | Order id (NS-…) after successful payment |
| Order history | /shop/orders | The signed-in user's orders: status filter, cancel, request return, buy again |
| Order management | /shop/admin | Store manager only: ship, deliver, approve or reject returns (others see Access denied) |
| Bug hunt | /shop/bug-hunt | Briefing, hints and answers for buggy_user's 5 seeded defects |
4Main end-to-end journey
Guest to paid order with coupon
- Open /shop and log in as demo_user / Demo@123
- Search "headphones" and add Aurora Wireless Headphones to the cart
- Open the cart and apply coupon SAVE10
- Checkout with valid shipping details and card 4242 4242 4242 4242, 12/30, 123
- Accept terms and place the order
- Open Orders
Expected: Success page shows an NS-<digits> order id, the discount is applied, and the same order appears first in the orders table
5Business rules & validations
- Valid & invalid loginBeginner
demo_user / Demo@123 succeeds; wrong password and empty fields show login-error.
- Locked-out userBeginner
locked_user gets “Sorry, this user has been locked out.”
- Slow loginIntermediate
slow_user takes ~3s — wait for the URL or product grid, never sleep.
- Route guardBeginner
Visiting /shop/cart signed out redirects to /shop.
- Search, filter & sortIntermediate
Assert product-count text, no-results state, and that product-price values are sorted.
- Cart badge & quantitiesIntermediate
Add/remove from the grid, change qty in the cart, check line-total and totals maths.
- CouponsIntermediate
SAVE10 = 10% off, FLAT20 = $20 off above $100, anything else is rejected.
- Checkout validationIntermediate
Submit empty to collect error-* messages; fix them one by one.
- Declined cardAdvanced
4000 0000 0000 0002 shows payment-error; switch to Cash on delivery and succeed.
- Order historyAdvanced
Order id on the success page must appear in orders-table after navigation.
- Cancel, return & buy againIntermediate
Cancel a Processing order in cancel-modal; request a return on a Delivered one (a reason is required); reorder-* refills the cart.
- Store manager roleAdvanced
admin_user lands on /shop/admin, ships and delivers orders and decides returns; demo_user sees access-denied there.
- Bug huntAdvanced
buggy_user has 5 seeded defects (sort, search, badge, tax, order total) — write tests that fail for it and pass for demo_user.
- UI vs APIAdvanced
POST /api/shop/quote prices the same cart; assert subtotal, discount, tax and total match the cart page.
6Test data & credentials
- URL
- /shop
- User
- demo_user
- Password
- Demo@123
- Manager
- admin_user
- Coupons
- SAVE10 · FLAT20
- Declined card
- 4000 0000 0000 0002
7Glossary
- SAVE10 / FLAT20
- Coupons: 10% off, or $20 off orders above $100
- Declined card
- 4000 0000 0000 0002 always fails payment
- Route guard
- Signed-out users are redirected from protected pages back to login
- Order status
- Processing → Shipped → Delivered; or Cancelled (customer, while Processing); or Return requested → Returned / back to Delivered
- Quote API
- POST /api/shop/quote prices a cart with the same rules as the cart page
8Watch-outs for automation
- ⚠️Orders live in this browser, so the customer and the manager must use the same browser context — switch user by logging out
- ⚠️slow_user login takes ~3 s — wait for the URL or product grid, never sleep
- ⚠️Cart state persists in the browser; clear storage between tests for isolation
- ⚠️Checkout shows an error summary plus per-field errors — assert both
9Suggested test strategy
1 · Smoke
7
P1 positive and end-to-end cases — run on every build.
2 · Regression
30
All cases, incl. 8 negative and 7 edge — run before release.
3 · End-to-end
4
Full user journeys — run nightly.
Start with these smoke cases
- NOVASHOP-01 — Login with valid standard user
- NOVASHOP-02 — Buy a product end to end
- NOVASHOP-03 — Apply SAVE10 coupon
- NOVASHOP-17 — Store manager ships an order
- NOVASHOP-E2E-01 — Guest to paid order with coupon
- NOVASHOP-E2E-02 — Declined card then cash on delivery
- NOVASHOP-E2E-04 — Order, ship, deliver and return across two roles