dodil/erp-brick-pos

DODIL ERP brick: point of sale

tests/test_remaining.py

"""The stories NOT built after slice B, by id (module.yaml stories). Each is a strict xfail: `pytest -q -rx` lists exactly what is
left, and a story that starts to pass must lose its mark. Slice C and later: the till layout, discounts, offline sync and quarantine, the
Z report, the shop day and its journal, card settlement, fiscal capabilities, loyalty, a full VAT invoice, the Odoo migration."""
import pytest

REMAINING = {
    "POS-02": "the till layout, versioned, with modifiers",
    "POS-10": "discounts within a role's limit; the override by another person",
    "POS-12": "offline sync: keyed on the device, replay by digest, quarantine of a conflicting digest",
    "POS-14": "a full VAT invoice for a named customer (business-partner, ar)",
    "POS-16": "the outbox for tax recompute, loyalty and payments hand-overs (only the stock row is built)",
    "POS-17": "the Z report of a session and of a shop's day, numbered gapless per register",
    "POS-18": "the day's readiness list and the tax_agrees comparison",
    "POS-20": "the day's summary journal in gl, one per SHOP and business date (built per session: post_session, tests/test_closing.py)",
    "POS-21": "a late receipt marks a posted day stale and posts a supplement",
    "POS-24": "the fiscal capability by country profile (de_kassensichv, fr_nf525, at_rksv)",
    "POS-25": "the fiscal export (DSFinV-K, NF525 archive, RKSV DEP)",
    "POS-26": "payments hand-overs: the card settlement (the expected deposit batch of a cash bag is built, tests/test_closing.py)",
    "POS-28": "tax's POST /documents/compute at sync, stored as pos's copy",
    "POS-29": "the gl journal seam for the shop's day and its supplement (a session's journal is built)",
    "POS-32": "a cashier employed today in hr; the PIN",
    "POS-33": "loyalty stamps as a line discount",
    "POS-34": "the Odoo migration of closed sessions and orders, reconciled and signed",
}


@pytest.mark.xfail(strict=True, reason="a later slice")
@pytest.mark.parametrize("story", sorted(REMAINING))
def test_story_not_yet_built(story):
    raise NotImplementedError(f"{story}: {REMAINING[story]}")