---
id: TST-ACC-TRX-326
title: Billing setup suite
kind: browser-lifecycle
product_area: accounting
module: transactions
revision: 1
status: draft
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: react-console
files:
  - e2e/mock/billing-setup.mock.spec.ts
implements: []
implements_parts: []
environment: mock
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: A browser context and suite-controlled mocked responses.
provenance: test
source: 'react-console:e2e/mock/billing-setup.mock.spec.ts'
evidence:
  - provenance: test
    source: 'react-console:e2e/mock/billing-setup.mock.spec.ts'
    assertion_titles:
      - billing notices
      - lists the seeded notices in place of the sample Notices
      - 'creates a notice sent to contacts in roles, which then shows in the list'
      - a new billing run
      - 'estimates a template, prepares the run and lands on it'
      - saves a draft instead
      - the list's New Billing Run button opens the form
      - the billing template editor
      - 'is Configuration › Billing › Templates, listing the seeded templates'
      - 'edits a template''s actions, showing what can''t be added and why'
      - offers the saved queries over the records the notice is sent to
    imports:
      - 'import { expect, test, type Page } from "@playwright/test"'
      - 'import { mockUrl, routes, urlPattern } from "../support/routes"'
    test_double_declarations:
      - ' * MOCK: billing setup — Billing Notices (Configuration › Billing › Notices), the New Billing Run page and'
      - ' * the billing template editor — against the stand-in Accounting service (`mocks/handlers/billing.ts`,'
      - ' * `mocks/billing/store.ts`), as a customer administrator (`?mockIdentity=customer`).'
      - ' * It writes the screenshots the design is reviewed from under `e2e/mock/__screenshots__/billing-setup/`.'
      - ' *   pnpm e2e:mock -- billing-setup'
      - 'import { mockUrl, routes, urlPattern } from "../support/routes"'
      - >-
        const SHOTS = process.env.BILLING_SETUP_SCREENS_DIR ??
        "e2e/mock/__screenshots__/billing-setup"
      - >-
        const noticesUrl = mockUrl(routes.configuration.moduleArea("accounting",
        "notices"), { mockIdentity: "customer" })
      - >-
        const newRunUrl = mockUrl(routes.accounting.newBillingRun(), {
        mockIdentity: "customer" })
      - >-
        const templatesUrl =
        mockUrl(routes.configuration.moduleArea("accounting",
        "billingTemplates"), { mockIdentity: "customer" })
      - '  mockUrl(routes.configuration.moduleArea("accounting", "billingTemplates", [id, "edit"]), { mockIdentity: "customer" })'
      - '    await page.goto(mockUrl(routes.accounting.billingRuns(), { mockIdentity: "customer" }))'
      - '    await expect(page).toHaveURL(urlPattern(mockUrl(routes.accounting.newBillingRun())))'
---

# Billing setup suite

## Verification Boundary

The suite exercises console screens and their requests in a browser with controlled responses. Registration records the existing executable file; it does not report a run or establish product approval.

## What This Suite Proves

The executable assertions exercise this module, but no capability or feature scenario binding is established for this file. Its individual assertion titles remain in the evidence register for subsequent mapping.

## What It Does Not Prove

Controlled browser responses do not establish service authorization, database bounds, processor behavior or financial persistence. An unbound feature chain remains proposed, and this registration carries no execution result.

## Real Dependencies and Test Doubles

The real browser and console components run against suite-controlled data or responses. The evidence register identifies the mock setup; those returned values are assumptions of the screen test.

## Must Not Be Doubled

The screen components, their validation and their outgoing request construction are the verification boundary and must remain real. Service financial integrity needs an additional suite with real persistence.
