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 CLIInsurance

Test buying a policy and the document it issues

A payment is only half of it. The policy document has to exist and carry the cover that was sold.

Published on:

Buying insurance produces a charge and a contract. The charge is easy to verify and the contract is the one that matters when the customer needs to claim.

This use case buys a policy on the Limonade clone and opens the document it issues.

Failure modes in this flow

The document is where this test earns its place, because it is the artifact nobody checks until a claim is refused.

  • The quote holds through checkout - $17.90 on the quote and again on the confirm screen.
  • The policy activates - an active badge rather than a pending or processing state.
  • The policy number exists - LMN-770420, which is what the customer quotes forever after.
  • The document matches the sale - its body carries the policy number and the personal property cover of $20,000.00.

Asserting inside the document body, and not just that a document opened, is the difference between a file existing and a contract being correct. A policy document that renders with a different cover than the one sold is unenforceable in the customer's favour.

Note

Note: Asserting text inside a generated document is an ordinary step, which makes contract artifacts as testable as the screens that produce them. Try it on TestMu AI. Try free!

Writing the objective

The first step compresses the whole quote into one instruction because it is setup; the three steps that follow each cover one part of the purchase.

---
mode: testing
url: https://my-testing-repo-main.vercel.app/lemonade-clone-app/quote?reset=true
max_steps: 55
tags: [lemonade, insurance, purchase]
---

# Limonade 26.2: Policy purchase

Catalog objective: buy the quoted policy with a test payment.
Key assertion: the policy is active with a document available.

## Get a quote first
Type "Priya" into "Your name" and click "Next", click "Next" again on the place step, then click "See my price" and verify "Monthly premium" reads "$17.90".

## Go to checkout
Click "Buy this policy" and verify a "Confirm and pay" card appears showing "Monthly premium" of "$17.90".

## Pay with the test card
Type "4242 4242 4242 4242" into "Card number", click "Activate my policy", and verify the page shows "Your policy" with an "Active" badge.

## Verify the policy and its document
Verify "Policy number" reads "LMN-770420" and "Monthly premium" reads "$17.90", then click "View policy document" and verify the document body contains "LIMONADE RENTERS POLICY", "Policy number: LMN-770420" and "Personal property .......... $20,000.00".

The step ceiling is raised to 55 since the flow completes a quote before the purchase it is actually testing begins.

The assertions in detail

A quote, a checkout, a payment and the contract.

StepWhat it proves
Get a quote firstA priced quote exists to buy
Go to checkoutThe quoted premium carries into the confirm screen unchanged
Pay with the test cardPayment is accepted and the policy reaches an active state
Verify the policy and its documentPolicy number, premium, and the cover printed in the document

The premium is asserted three times across the flow: on the quote, on the confirm screen and on the policy. That is deliberate for a figure the customer is billed for monthly.

Next-generation test execution with TestMu AI

Running it locally

kane-cli testmd run tests/lemonade/policy-purchase_test.md

Add a declined card variant, since a failed payment that still issues a policy is a liability and one that issues nothing without explaining is a lost sale.

Generated documents are a common gap in browser coverage. File handling in Kane CLI covers downloads and documents, and evidence based QA covers keeping proof of what was issued.

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

Policy Purchase 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