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 CLIInvoicing

Test paying an invoice and the status that has to flip

Pay an invoice from its detail page, then go back to the list and confirm the status changed there too.

Published on:

Invoices are cash flow. A paid invoice that still reads unpaid in the list triggers a chase email to a customer who has already paid, which costs a relationship rather than a transaction.

This use case pays an invoice on the Squair clone and then checks the list view, which is where the status actually gets read.

The flow under test

The status lives in two places and they are updated by different code, which is the whole reason this test goes back to the list at the end.

  • The list says unpaid - established before anything changes, so the flip is provable.
  • The detail matches the invoice - billed to, amount due and due date, so the right invoice is being paid.
  • Payment completes - a banner naming the payment id.
  • Both views agree - the detail badge reads paid, and so does the row in the list.

Navigating back to the list is the step that distinguishes this from a payment test. A detail page that updates while the list does not is one of the most common and most expensive inconsistencies in billing software.

Note

Note: A status that renders from two different queries needs asserting in both places, which is one extra navigation and one extra line. Try it on TestMu AI. Start for free

The test file

The invoice detail assertion includes the due date, which is the field most likely to be wrong after a timezone change and least likely to be noticed.

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

# Squair 12.2: Invoice pay

Catalog objective: open an emailed invoice and pay it online.
Key assertion: the invoice status flips to paid.

## Open the unpaid invoice
Verify the "INV-2041" row carries an "unpaid" badge, then click "Open" on it.

## Verify the invoice details
Verify the page title reads "Invoice INV-2041" with "Billed to" of "Northwind Software · ap@northwind.example", "Amount due" of "$480.00" and "Due date" of "2026-09-22".

## Pay the invoice
Type "4242 4242 4242 4242" into "Card number", click "Pay $480.00", and verify a green banner titled "Invoice paid" names payment "pay_8813".

## Verify the status flipped
Verify the invoice status badge now reads "paid", then click "← All invoices" and verify the "INV-2041" row carries a "paid" badge.

The final step navigates back through the all invoices link rather than reloading, because that is the path a user takes and the one where a cached list would surface.

Step by step coverage

Each step pins one view of the same invoice, and the last one closes the loop.

StepWhat it proves
Open the unpaid invoiceThe list shows an unpaid badge before any change
Verify the invoice detailsRecipient, amount due and due date identify the right invoice
Pay the invoicePayment completes and a payment id is issued
Verify the status flippedBoth the detail view and the list row read paid

Returning through the navigation a user would take, rather than reloading, is what exposes a list served from cache after an update.

Next-generation test execution with TestMu AI

Running it

kane-cli testmd run tests/square/invoice-pay_test.md

What you end up with is a receivables test that checks the number a finance team reads, not only the screen where the payment happened.

Any status that appears in both a list and a detail view deserves the same treatment. Checking the UI before a pull request is where this belongs in a review cycle, and Kane CLI as a QA agent covers building a billing suite around it.

Author

...

Bhawana

Blogs: 77

  • 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

Invoice Payment 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