Checkout Flow (checkout-flow)
Summary
Synthetic shopper path: product → add to cart → cart verification → checkout page (B2B-aware).
Classification
- Category:
ECOMMERCE - Plugin id:
checkout-flow - Version:
2.4.0 - Target types:
WEBSHOP - Weight class:
MEDIUM - Risk level: not set on plugin object
- Browser required: Yes (Playwright)
- Tier / group: Tier 3 — E-commerce / flows (Playwright)
Schedule
- scheduleHints:
{ defaultInterval: '*/15 * * * *', priority: 2 }. A fixed-cadence monitor (FIXED_CADENCE_TEST_SLUGS): no back-off, no schedule multiplier, exempt from the daily run cap (TESTE-NO-586). - Prerequisites: None declared on this plugin.
Configurable inputs
Public keys are derived from inputSchema: z.object({ ... }) (underscore-prefixed keys are runtime-only and omitted here).
| Field | Notes |
|---|---|
productUrl |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
cartUrl |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
checkoutUrl |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
timeout |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
stepTimeout |
Zod field in inputSchema — see source for defaults, min/max, and .describe(). |
failuresBeforeAlert |
Failed runs in a row before the CRITICAL «Checkout broken» alarm (default 2). |
Runtime / injected config
_secrets—LOGIN_EMAIL/LOGIN_PASSWORD(or lowercase variants) for B2B login before the flow._requiresLoginForPurchase— the B2B flag a person set on the target: log in first, or skip without credentials. The fingerprint's AI guess no longer decides (TESTE-NO-586)._priorRunMetrics— the previous measured run's metrics;monitorStatecarries the failure streak._hasEverPassed— first-run heuristics for suspected B2B (_suspectedB2Bin metrics)._recordVideo— flow recording when enabled by the worker.
What it does
- Runs as part of the worker test execution pipeline; results become
Runrows and may createFindingrecords. - Synthetic shopper path: product → add to cart → cart verification → checkout page (B2B-aware). Navigation uses
gotoDocumentReady(domcontentloaded+ best-effortload); it does not wait for Playwrightnetworkidle. - Kaduno demo tenant only (
demo.preview.kaduno.com, exact host — not*.preview.kaduno.com): HTML document GET of/and/checkoutwithAccept: text/html. Fails on HTTP 404 /preview-not-configured(title, body,x-middleware-rewrite) before any Magento selector. Magento chrome and missing Kjøp/Handlekurv/Kasse apply only on a mapped 200 shop page. Pia cut: also GET public tRPCpayment.methods.list, GET/login, GET/cart, and an isolated GET/checkoutwith the same HTML Accept (no*/*, no pay, no payment intents, no POST). FAIL if unmapped/error/empty, or invoice/Faktura listed without worldline/card/sandbox_card. PASS only if card/Worldline is listed./loginFAIL if unmapped/preview-not-configured, Magento chrome, or no login form; PASS only if a Kaduno login form is present on HTML./cartFAIL if unmapped/preview-not-configured, Magento chrome, or no Kaduno cart; PASS only if a Kaduno cart is present on HTML. Isolated/checkoutFAIL if unmapped/preview-not-configured, Magento chrome, or missing Kaduno checkout (Kasse / checkout chrome); PASS only if a Kaduno checkout is present on HTML. An HTML 404 does not skip the list,/login,/cart, isolated/checkout, guest cart API, orshipping.methods.list— that is an honest fail. Pia cut: also GET public tRPCshipping.methods.listwithAccept: application/json(no*/*, no HTML-as-pass, no pay). FAIL if unmapped/error/empty/missing, Magento/rest/V1/guest-carts/:id/shipping-methodsanswering, invoice-style list without bring/postnord/posten/fedex/gordon, or any item.storeConfigId of sc_idt / sc_stolsvidda / sc_vikingvask (and close variants) on demo.preview.kaduno.com — that is a tenant leak, not a carrier pass. Tenant leak outranks carrier-present pass. PASS only if an expected carrier is listed and no owner storeConfigId leaked. Pia cut: also GET public tRPCcatalog.products.listwithAccept: application/json(no wildcard Accept, no HTML-as-pass, no pay). Liveproducts.list/product.search/catalog.searchare missing;catalog.products.listis the procedure that 200s. FAIL if unmapped/error/empty/missing/store-context, Magento/rest/V1/productsanswering, or other-store SKUs/slugs/storeConfigId (sc_idt / sc_stolsvidda / sc_vikingvask) on demo.preview.kaduno.com. Empty catalog is an honest fail. Tenant leak outranks a non-empty catalog. HTML 404 does not skip this check. Other*.preview.kaduno.comhosts (e.g.idtsports.preview.kaduno.com): same HTTP/tRPC probes, but multilingual chrome is allowed (no Kjøp/Kasse requirement), any listed payment/shipping method is a pass, and ownerstoreConfigIdon that tenant is not a leak. Worker preview runs sharepassKadunoPreviewGate: gated-entry preflight, then at most one/api/staging-authPOST per run using Secrets VaultKADUNO_PREVIEW_PASSWORD(Basic password fallback), with password/__kaduno_staging_authredaction, exact HTTPS-origin HTTP attachment and host-only local/remote browser cookies. A still-gated home stops before REST/tRPC probes asACCESS_GATEDwithout findings/score (vault-key/refused advice); gated sub-probes contribute only agatedProbescount, while public tRPC auth failures on readable homes remain failures. Other non-preview hosts keep the Magento/Shopify Playwright path. - For finding titles, metrics, and artifacts specific to this plugin, refer to the implementation linked below.
Checks that produce findings
| Check | Typical severity | Why |
|---|---|---|
HTML 404 / preview-not-configured on / or /checkout (Kaduno demo tenant) |
CRITICAL | Unmapped preview is not a shop. Must not be reported as a Magento add-to-cart miss. Wildcard Accept */* 200 is not a pass. |
| Magento chrome on a 200 shop page (Kaduno demo tenant) | CRITICAL | This tenant should serve Kaduno storefront/kasse, not Magento. |
| Missing Kjøp / Handlekurv / Kasse on mapped Kaduno HTML | CRITICAL | Checkout chrome gone on a configured storefront. |
Public tRPC payment.methods.list unmapped/error/empty, or invoice/Faktura without worldline/card/sandbox_card (Kaduno demo tenant) |
CRITICAL | Card/Worldline must be listed. HTML 404 preview-not-configured does not skip this check. No pay. |
GET /login HTML 404 / preview-not-configured, Magento chrome, or no login form (Kaduno demo tenant) |
CRITICAL | PASS only if a Kaduno login form is present. Wildcard Accept */* 200 is not a pass. Never POST credentials. HTML 404 does not skip /login. |
GET /cart HTML 404 / preview-not-configured, Magento chrome, or no Kaduno cart (Kaduno demo tenant) |
CRITICAL | PASS only if a Kaduno cart is present. Wildcard Accept */* 200 is not a pass. Never POST. HTML 404 does not skip /cart. |
Isolated GET /checkout HTML 404 / preview-not-configured, Magento chrome, or missing Kaduno checkout (Kasse / checkout chrome) (Kaduno demo tenant) |
CRITICAL | PASS only if a Kaduno checkout is present. Wildcard Accept */* 200 is not a pass. Never POST. HTML 404 does not skip this isolated /checkout check. Does not rewrite Validoria evaluateKadunoDemoCheckout. |
Public tRPC shipping.methods.list unmapped/error/empty/missing, Magento guest-cart shipping-methods answering, owner storeConfigId leak (sc_idt / sc_stolsvidda / sc_vikingvask), or invoice-style list without bring/postnord/posten/fedex/gordon (Kaduno demo tenant) |
CRITICAL | Expected carriers must be listed on the demo store only. Owner storeConfigId on demo.preview.kaduno.com is a tenant leak and outranks carrier-present pass. JSON Accept only. Magento /rest/V1/guest-carts/:id/shipping-methods answering is a fail, not a pass. HTML 404 preview-not-configured does not skip this check. No pay. |
Public tRPC catalog.products.list unmapped/error/empty/missing/store-context, Magento /rest/V1/products answering, or other-store SKUs/slugs (sc_idt / sc_stolsvidda / sc_vikingvask) (Kaduno demo tenant) |
CRITICAL | Demo catalog must list demo-store items only. JSON Accept only. Magento /rest/V1/products answering is a fail, not a pass. Empty is an honest fail. HTML 404 preview-not-configured does not skip this check. No pay. |
| Playwright checkout steps (other hosts) | CRITICAL / WARNING | Existing Magento/Shopify synthetic shopper path. Navigation uses gotoDocumentReady (domcontentloaded), never a hard networkidle wait — Magento shops with analytics/chat never go idle. |
Playwright page.goto timeout (other hosts) |
WARNING | Page-load timeout, not a missing selector and not a B2B login miss. |
| Empty payment/shipping/catalog tRPC lists on a customer Kaduno preview host | CRITICAL | Go-live shop must list methods and products. Worldline/Bring/Norwegian chrome are demo-only requirements. |
| B2B login sent and refused (wrong password, no login page, no form) | WARNING | checkout:b2b-login-failed:<target>. |
| B2B login step skipped 3 or more runs in a row (TESTE-NO-570) | WARNING | One checkout:login-cannot-run:<target> «Login test can't run», never escalated. See below. |
Escalation policy is NONE (TESTE-NO-586): a step WARNING (a JavaScript error on a checkout that works, a slow step) never escalates to CRITICAL by recurrence. The alarm for a broken checkout is the monitor's own CRITICAL checkout:broken:<origin> after failuresBeforeAlert failed runs in a row.
B2B login step skips
Looking for the login page that ran out of time, a login page that did not load, or a login field that would not take text ends the run SKIPPED (SITE_UNRESPONSIVE), with metric loginStepSkipped: 1; the run shows the reason. One such skip raises nothing. The worker counts them per target in TestProfileEntry.consecutiveLoginSkips, and from the 3rd in a row the run hands the findings engine one WARNING «Login test can't run». It says how many runs in a row the login could not run, gives the last reason, and lists what to check: the login form's selectors may have changed, a bot block may stop the browser, or the site's login page may itself be down or slow. Later login skips update that one finding, and the skipped run closes none of the test's other findings. The first run that gets past the login (any measured run, a wrong-password run included) sets the count to 0 and resolves it. A skip for missing credentials, a not-applicable skip, or a timeout after the login neither counts nor resets.
Source
packages/test-plugins/src/plugins/checkout-flow.ts
Checkout monitor (TESTE-NO-586)
Every live store runs this test every 15 minutes.
- One failed run: a WARNING per failed step, as before. The step heuristics misread a page now and then (TESTE-NO-417).
failuresBeforeAlertfailed runs in a row (default 2): one CRITICALcheckout:broken:<origin>per store, naming the failing step and the count, so an incident and the team's alerts follow.- A pass: resets the streak, and the alarm closes.
- Not judged: a failed B2B login, or a step skipped for a reason of its own (minimum order, out of stock). The run keeps the streak and raises an open alarm again unchanged.
- Skipped runs: passed over.
Nothing flags a shop B2B automatically. A first-run failure leaves only the INFO «Possible B2B» finding, and a person decides. A store marked B2B without LOGIN_EMAIL / LOGIN_PASSWORD is not run. schedule-check then raises the WARNING «Checkout can't be tested: this shop needs a test login» (checkout:needs-login:<targetId>), and resolves it once the login is there or the flag is off.