Hero Background

Power Your Software Testing with AI Agents and Cloud

The Native AI-Agentic Cloud Platform to Supercharge Quality Engineering. Test Intelligently and Ship Faster.

Kane CLIPoint of Sale

Test a tip screen and the receipt that follows

A tip is a percentage applied in front of a customer at a counter. Four steps pin the subtotal, the tip, the total and the receipt.

Published on:

A tip screen is the only part of a payment flow that runs while a customer is watching over the counter. It applies a percentage, changes a total, and gives the operator no chance to check the arithmetic.

This use case rings up a sale on the Squair web POS, takes a twenty percent tip and checks the receipt carries it. The test file below is the whole thing.

The flow under test

Tip arithmetic is where a point of sale loses money in both directions, and it is worth asserting each figure rather than only the amount charged.

  • The subtotal before any tip - $9.75 for two items, which is the base the percentage applies to.
  • The tip itself - $1.95, which is twenty percent of the subtotal and not of some other figure.
  • The total - $11.70, matching subtotal plus tip exactly.
  • The receipt - the same tip and total again, alongside a payment id.

Asserting the tip as its own line, and not just the final total, is what catches a percentage applied to a post-tax figure. Both produce a plausible total and only one of them is what the customer agreed to.

Note

Note: Kane CLI drives a web point of sale the same way a cashier does, by the labels on screen, so no test scaffolding sits between the flow and the interface. Start on TestMu AI. Start for free

The test file

The tip option is referenced by its percentage label and the assertions quote the resulting currency values, so the relationship between the two is pinned by the file rather than assumed.

---
mode: testing
url: https://my-testing-repo-main.vercel.app/square-clone-app/pos?reset=true
max_steps: 45
tags: [square, payments, pos]
---

# Squair 12.3: Tip and receipt

Catalog objective: complete a payment with a tip selection on the web POS.
Key assertion: the total includes the tip and a receipt is offered.

## Ring up a sale
Click "Oat Latte" and "Cardamom Bun" in the items list and verify the sale shows "Subtotal" of "$9.75".

## Go to the tip screen
Click the charge button and verify a "Add a tip?" screen appears showing "Subtotal" of "$9.75".

## Choose a tip
Click the "20%" tip option and verify "Tip" reads "$1.95" and "Total" reads "$11.70".

## Charge and verify the receipt is offered
Click "Charge $11.70" and verify a green banner says "$11.70" was charged including a tip of "$1.95", with a "Send a receipt?" card showing "Payment ID" of "pay_8813", "Tip" of "$1.95" and "Total" of "$11.70".

The final step checks the banner and the receipt card together, because a charge that succeeds without offering a receipt is a complaint waiting to happen at a counter.

Step by step coverage

Each step in the file establishes one figure that the next step depends on, which keeps any failure attributable.

StepWhat it proves
Ring up a saleTwo items produce a subtotal of $9.75
Go to the tip screenThe tip prompt appears carrying the same subtotal forward
Choose a tipTwenty percent yields $1.95 and a total of $11.70
Charge and verify the receipt is offeredThe charge, the tip line and a receipt with a payment id all appear

The subtotal is asserted twice, on the sale and again on the tip screen. That is deliberate: a tip screen reading a stale or rounded subtotal is the most common way these numbers drift apart.

Next-generation test execution with TestMu AI

Running it

kane-cli testmd run tests/square/tip-and-receipt_test.md

Run it against a local build or a deployed POS with the same file. Nothing in it is environment specific except the starting URL in the front matter.

A point of sale is also the surface where a small rounding change ships without anyone noticing. Checking the UI before a pull request is where this belongs in a review cycle, and the test.md format covers the front matter options used above.

Author

...

Bhawana

Blogs: 75

  • Twitter
  • Linkedin

Bhawana is a Community Evangelist at TestMu AI with over 3 years of experience creating technically accurate, strategy-driven content in software testing. She has authored 50+ blogs on test automation, cross-browser testing, mobile testing, and real device testing. She also serves as Product Marketing Manager for Kane CLI, the command-line tool that runs browser automation from the terminal using natural-language flows in a real Chrome browser. Bhawana is certified in KaneAI, Selenium, Appium, Playwright, and Cypress, reflecting her hands-on knowledge of modern automation practices. On LinkedIn, she is followed by 6000+ QA engineers, testers, AI automation testers, and tech leaders.

Add to Google preferred sources

Summarise with AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

POS Tip Screen FAQs

Did you find this page helpful?

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests