Payment declined (Vitest)
Generated output
Section titled “Generated output”### ✅ Payment declined
- **Given** the user is on the checkout page- **When** the user submits a declined card- **Then** the payment should be declined- **And** the user should see "Payment failed"- **But** the order should not be createdVitest code
Section titled “Vitest code”it("Payment declined", ({ task }) => { story.init(task); story.given("the user is on the checkout page"); story.when("the user submits a declined card"); story.then("the payment should be declined"); story.then('the user should see "Payment failed"'); story.but("the order should not be created");});