Skip to content

[TASK] e2e - invoicing suite: inFakt provider, payment marking, corrections (KOR), FA(3) field + preview parity #1573

Description

Problem / Context

S8 covers a single invoicing configuration: KSeF direct, one VAT document, happy path. Recently merged and untested at the E2E level:

Proposed Solution

New suite apps/e2e/tests/invoicing/ (unattended - source orders synthesized via a REST source, KSeF test env + inFakt sandbox as external systems). Scenarios:

  1. inFakt provider run: issue -> submitted -> accepted via inFakt (observed E2E latency ~90 s); the invoice carries the shipping line and totals match the order (reuse assertInvoiceAmounts).
  2. Payment marking, both directions: mark-as-paid in OL propagates to inFakt (PaymentMarker); the inFakt marked-as-paid webhook updates OL.
  3. Bulk issue + resend + e-mail: bulk issuance from the orders list; resend a rejected document; e-mail send affordance.
  4. Correction (KOR): issue a correction (quantity/price delta) on a KSeF invoice -> accepted; then a correction-of-correction - asserting deltas are computed against the lines as issued (issuedLineSnapshot, [TECH-DEBT] CORE — Persist issuance-time line snapshot on InvoiceRecord for safe KSeF corrections #1297), not the order's current state.
  5. FA(3) field parity (feat(ksef): emit P_6 / P_8A / P_9A in FA(3) documents #1529): source XML contains correct P_6 / P_8A / P_9A (extend the existing S8 source-XML assertions).
  6. FA(3) preview (feat(web/ksef): rebuild FA(3) preview to mirror the official KSeF visualization #1528): the preview renders the invoice's sections/amounts structurally (DOM-level, not pixel).
  7. Transfer + bank accounts: issuing a Transfer invoice offers the live account picker; setting a default persists on the provider.

Classification

Type: DX
Layer: Test infrastructure (apps/e2e)
File(s): apps/e2e/tests/invoicing/*.spec.ts, apps/e2e/src/pages/invoice-panel.page.ts, apps/e2e/src/support/parity.ts, apps/e2e/src/api/api-client.ts

Dependencies

Assumptions

  • Scenario 2's inbound webhook needs the OL API reachable from inFakt (tunnel) - env-gated if the stack cannot expose it.
  • The reconcile job can be triggered explicitly via the sync-jobs API (as the golden path already does) instead of waiting for the 30-min cron.
  • If any listed FE affordance turns out not to exist yet (e.g. e-mail send), the scenario is dropped from this issue and filed as a product gap instead.

Acceptance Criteria

  • Scenarios 1-7 implemented and passing (webhook scenario env-gated if tunnel-dependent)
  • Correction-of-correction asserts snapshot-based deltas explicitly
  • Suite is unattended and runs as its own Playwright project
  • PR merges into 1479-apps-e2e-playwright-framework

Part of epic #1570.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions