---
id: TST-ACC-TRX-315
title: Accounting configuration suite
kind: browser-lifecycle
product_area: accounting
module: transactions
revision: 1
status: draft
source_sha:
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: react-console
files:
  - e2e/mock/accounting-configuration.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/accounting-configuration.mock.spec.ts'
evidence:
  - provenance: test
    source: 'react-console:e2e/mock/accounting-configuration.mock.spec.ts'
    assertion_titles:
      - Business Units
      - >-
        lists each unit with its currencies, fiscal year and when it was last
        written
      - searches by name and offers a way back when nothing matches
      - creates a unit with a base currency and the others it may hold
      - >-
        fixes the base currency and the fiscal year once the unit exists, and
        says why
      - >-
        turning Enable Multicurrency off asks first, then clears the supported
        currencies
      - shows Accounting's refusal when a currency still in use is switched off
      - refuses a multicurrency unit with no supported currency
      - >-
        has no Default GL Accounts section: those are assigned from the Chart of
        Accounts
      - suggests the initials of the name as the ID
      - >-
        uses the template a unit's documents are chosen to use, and Built-in
        saves as none
      - >-
        refuses to delete a unit that still has accounts, in the service's own
        words
      - deactivates a unit and hides it until Show Inactive is on
      - GL Accounts
      - 'lists one business unit''s chart of accounts, and says which unit'
      - redraws the rows when the Business Unit filter changes to another unit
      - shows every unit together with a Business Unit column when asked
      - >-
        toolbar reads Business Unit, Search, Refresh, Show Inactive, with no
        Account Type selector
      - >-
        asks for a unit's required default accounts, and the notice goes once
        they are assigned
      - >-
        disables Default Accounts while every business unit is listed, and says
        why
      - >-
        says a unit with no GL accounts has none to choose from before its
        defaults can be assigned
      - upper-cases a code as it is typed and keeps it once the account exists
      - offers only the currencies its business unit keeps books in
      - >-
        says the accounts couldn't be loaded, never that there are none, when
        Accounting keeps refusing the list
      - >-
        still lists the accounts when the business units behind the filter can't
        be read
      - refuses to deactivate an account a business unit still defaults to
      - Bank Accounts
      - lists the accounts with their cash GL account and masked number
      - takes four digits and nothing else
      - 'creates an account against a cash GL account, and keeps it on edit'
      - >-
        takes the currency from the business unit: locked for one currency, a
        choice among several
      - refuses to delete the GL account a bank account posts to
      - Merchant Accounts
      - 'stands a note above the list, because nothing is connected yet'
      - takes a processor's account reference only once a processor is chosen
      - deactivates an account and shows it again under Show Inactive
    imports:
      - 'import { expect, test, type Locator, type Page } from "@playwright/test"'
      - 'import { getArea } from "@/lib/configuration/areas"'
      - 'import { mockUrl } from "../support/routes"'
    test_double_declarations:
      - ' * MOCK: the four Accounting configuration screens — Business Units, GL Accounts, Bank Accounts and'
      - ' * MSW handlers (`mocks/handlers/accounting-configuration.ts`), as a customer administrator.'
      - ' *   ACCOUNTING_SCREENS_DIR=e2e/__screenshots__/accounting pnpm e2e:mock accounting-configuration'
      - ' * The handler state lives in the mock service worker, which is this browser context''s, so every'
      - 'import { mockUrl } from "../support/routes"'
      - >-
        const BUSINESS_UNITS = mockUrl(getArea("business-units").path, {
        mockIdentity: "customer" })
      - >-
        const GL_ACCOUNTS = mockUrl(getArea("gl-accounts").path, { mockIdentity:
        "customer" })
      - >-
        const BANK_ACCOUNTS = mockUrl(getArea("bank-accounts").path, {
        mockIdentity: "customer" })
      - >-
        const MERCHANT_ACCOUNTS = mockUrl(getArea("merchant-accounts").path, {
        mockIdentity: "customer" })
      - ' * Makes the mock Accounting API refuse the next `times` requests whose path contains `match` (an HTTP 500, as the'
      - '      if (sessionStorage.getItem("mock.accounting.refuse.armed")) return'
      - '      sessionStorage.setItem("mock.accounting.refuse.armed", "1")'
      - '      sessionStorage.setItem("mock.accounting.refuse", JSON.stringify({ match: fragment, times: count }))'
---

# Accounting configuration 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.
