Skip to main content
The costly bugs in a store rarely throw an error: a variant photo changes while the price stays old, a discount appears in the summary but the total does not drop, or a pickup slot is chosen and never reaches the order. These use cases check the parts of a store that have to agree with each other, across search, cart, checkout, orders, and the admin side. Every use case below was recorded against a demo storefront and comes with the _test.md file that produced the run. Each step in the file is written in natural language and ends with a check, so Kane CLI fails the run when what the shopper sees stops matching what the store recorded.

Run these recipes

Save any recipe below as a file ending in _test.md, change the url to your own store, and replace the product names and prices with values from your catalog. Then run it:
The first run authors each step and records it. Later runs replay the recording without calling the model, so the same file works as a regression check in CI. To run every e-commerce recipe as one suite, tag the files and run kane-cli testrun run --tags ecommerce --parallel 4 --headless. See Test.md and Batch Runs for the full format and flags.
The same files run against a native app on an Android emulator or an iOS simulator when you add target and app to the frontmatter. See Mobile Testing.

Search and product pages

Search and product pages decide whether a shopper reaches the right item at the right price. These recipes check that the result, the product page, and the selection controls all describe the same product.

Search to product page

A search that opens the wrong product page still looks like a working search. This recipe searches the storefront, opens the result, and checks that the title, brand, price, and buy box on the product page match the item that was searched for.
search-to-product-page_test.md
Kane CLI fails the run if the product page shows a different title or price from the search result, or if the buy box is missing its Add to Cart or Buy Now button.

Search with filters

A size that can be selected but has no stock is a lost order. This recipe searches for running shoes, applies a size filter and a price band, opens the only result, and then checks that size 8 is selectable and actually in stock.
search-with-filters_test.md
The last step reads the stock badge after the size is picked, so a size that is selectable but sold out fails the run.

Add to cart with a variant

On a product with several colours and connection types, each variant can carry its own price. This recipe switches colour and connection, checks that the price and the selection label update together at every step, and then confirms the cart received the exact variant and price.
add-to-cart-with-variant_test.md
A variant picker that updates the label but keeps the old price, or adds the wrong variant to the cart, fails the run at the step where the two stop agreeing.

Size guide and size selection

A size guide is only useful if the size picked from it is the size that ends up in the bag. This recipe opens the size guide, selects a size from the conversion table, confirms a sold-out size is disabled, and checks the bag carries the chosen size.
size-guide-and-selection_test.md
Kane CLI checks the bag line for the colourway and the size, so a size that is lost between the product page and the bag fails the run.

Shop search and favorites

Favorites that disappear after a reload make a marketplace feel broken even when no error appears. This recipe searches for a shop, favorites one listing, opens the favorites page, and reloads it to confirm the favorite was saved.
shop-search-and-favorite_test.md
The reload step is what proves persistence: a favorite that only lives in page state fails the run after the reload.

Cart and checkout

Checkout is where a wrong number costs money directly. These recipes check totals, payment, and confirmation together, so a page that loads with the wrong amount still fails.

Storefront guest checkout

Guest checkout is the shortest path to an order, and every field on it can break the order. This recipe adds a product, fills contact and shipping details as a guest, pays with a test card, and checks the thank-you page for the order number and the total.
storefront-guest-checkout_test.md
The total is checked twice, once in the order summary before payment and once on the thank-you page, so a total that changes during payment fails the run.

One-click checkout

One-click checkout depends on a saved address and a saved card being the ones actually charged. This recipe confirms the saved address and card in the buy box, buys with one click, and checks the confirmation for the order number and the card that was charged.
one-click-checkout_test.md
Kane CLI checks the card on the confirmation page against the card shown before purchase, so a charge to a different saved card fails the run.

Discount code application

A discount code can appear in the order summary while the total stays the same, and nothing on the page looks broken. This recipe tries an invalid code first, then applies a ten percent code and checks both the discount line and the final total.
discount-code-application_test.md
Because the discount line and the total are checked together, a code that is accepted but not applied to the total fails the run.

Buy It Now checkout

An order confirmation page shows that a purchase started, and the buyer’s purchase history shows that the store recorded it. This recipe buys a listing with a saved card and then follows the order into the purchase history to check the item, price, and card.
buy-it-now-checkout_test.md
A purchase that confirms on screen but never reaches the purchase history fails the run at the last step.

Checkout extension render

A checkout extension adds custom fields and upsells to the payment page, and a broken extension can block payment entirely. This recipe confirms the extension block renders, fills its custom field, takes the gift-wrap upsell, and then completes payment.
checkout-extension-render_test.md
The final step checks that the delivery instruction typed into the extension appears on the thank-you page, which proves the extension data reached the order.

Grocery, pickup, and delivery

Grocery and delivery flows carry preferences, slots, and per-store fees through checkout. These recipes check that each choice the shopper makes survives to the order summary and the confirmation.

Multi-store cart

A cart with items from two stores needs two sets of fees and two delivery windows. This recipe adds items from two stores and checks that checkout shows a separate service fee and a separately selectable delivery window for each store.
multi-store-cart_test.md
Kane CLI fails the run if the stores share one fee or one window, or if selecting a window in one store card changes the other.

Delivery slot checkout

A priority delivery slot adds a fee, and that fee has to reach the confirmation. This recipe picks a priority slot, adds a tip, pays with a test card, and checks that the confirmation carries the same window, service fee, and priority fee.
delivery-slot-checkout_test.md
The order total is checked before payment and the fees are checked again after it, so a fee that drops off during checkout fails the run.

Store pickup selection

Changing the pickup store or time should change the order summary too. This recipe chooses a nearby store and a free pickup slot, and then checks that the summary shows the same store, the same slot, and a free pickup fee.
store-pickup-selection_test.md
If the summary keeps the default store or the old slot after the shopper changes them, the run fails.

Grocery substitution preference

If a substitution setting stops saving, the shopper receives a brand they refused. This recipe sets a same-brand-only preference on one item, places an order, and checks that the preference is still attached to that item after checkout.
grocery-substitution_test.md
The last step reads the preferences on the confirmed order, so a setting that was shown as saved but lost at checkout fails the run.

Membership upsell

Every offer added to checkout raises one review question: what happens when the shopper says no. This recipe triggers the membership offer with an express slot, checks the plan prices, declines the offer, and confirms checkout is still usable.
membership-upsell_test.md
An upsell dialog that blocks the Place order button after No thanks is clicked fails the run.

Reorder from history

A reorder button is only useful if it brings back the same items in the same quantities. This recipe reorders a past purchase and checks the cart for every item, the quantity of each, and the subtotal.
reorder-from-history_test.md
A reorder that drops an item or resets quantities to one fails the run at the quantity check.

Orders, returns, and loyalty

After the purchase, shoppers come back to track, return, review, and spend rewards. These recipes check that post-purchase pages read from the same order data the checkout wrote.

Order tracking

A tracking page that shows the wrong stage sends customers to support. This recipe opens the order list, opens tracking for an in-transit order, and checks the delivery date, the carrier and tracking ID, and the current stage on the timeline.
order-tracking_test.md
Kane CLI checks that the current stage on the timeline is the one the order list reports, so the two pages disagreeing fails the run.

Return initiation

A return flow has to end with a return authorization and the right refund amount. This recipe opens a delivered order, starts a return with a reason and a pickup method, and checks for a return authorization number and the refund line.
return-initiation_test.md
A return that submits without an authorization number, or with a different refund amount, fails the run.

Review submission

A review form needs to reject empty reviews and keep the photo a buyer attaches. This recipe submits an empty review to check validation, then posts a five-star review with a photo and checks that both appear under the listing.
review-submission_test.md
The run fails if the empty review is accepted, or if the posted review appears without its text or its photo.

Loyalty balance

A rewards balance that renders as an error or a blank looks like lost money to the shopper. This recipe checks that the balance renders as a number and that the coin history and lifetime totals back it up.
supercoins-balance_test.md
Kane CLI checks the balance, the ledger entries, and the lifetime totals on one page, so a balance that does not match its history fails the run.

Members-only launch draw

A product launch draw has to block signed-out visitors and accept signed-in members. This recipe tries to enter while signed out, signs in, tries again without a size, and then enters with a size and checks the entry ID and status.
snkrs-draw-entry_test.md
Both sides of the rule are tested in one run: a signed-out entry that is accepted, or a member entry that is rejected, fails the run.

Store admin

Changes in the admin can break the storefront without anyone touching storefront code. These recipes drive the admin side and then check the result where shoppers or staff will see it.

Admin draft order creation

Staff create draft orders for phone and email customers, and a draft that never becomes a paid order is a lost sale. This recipe builds a draft order with a customer and a line item, saves it, marks it paid, and checks the orders list.
admin-order-creation_test.md
The last step checks that the new order appears in the orders list with the right customer, channel, and paid status.

Theme update smoke test

Publishing a new theme can hide a product grid or break the path to checkout. This recipe publishes a different theme from the admin, confirms the storefront picked it up, and walks a product all the way to the payment step.
theme-update-smoke_test.md
Kane CLI fails the run if the storefront still shows the old theme, or if checkout cannot be reached on the new one.

Next steps