@stardeck-customer-apps/testing 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SKILL.md CHANGED
@@ -670,7 +670,8 @@ cursor, limit })`; `list()` intentionally keeps its previous array shape.
670
670
  simulated, signature-checked like the others, and served from `app.controls`. Defaults are
671
671
  permissive so existing tests keep passing: `flag.paymentsSetupStep: false`,
672
672
  `plan.locations: { included: 3, max: null, extraMonthly: { amount: 990, currency: "THB" } }`,
673
- `plan.multiEntity: true`, `pos.pro: { locations: null }` (unlimited), `payments.provider: "beam"`,
673
+ `plan.multiEntity: true`, `pos.pro: { locations: null }` (unlimited),
674
+ `plan.accountingEdition: "medium"`, `payments.provider: "beam"`,
674
675
  `payments.methods: { card: true, promptPay: true }`.
675
676
  Seed with `createTestApp({ controls: { "plan.multiEntity": false } })`. Then
676
677
  `app.controls.set(key, value)` (the next `getControl` in the same process sees it: the
@@ -689,6 +690,11 @@ cursor, limit })`; `list()` intentionally keeps its previous array shape.
689
690
  (`{ locations: 0 }`, or as many as the test already set up: adding hardware is refused) and
690
691
  unknown (`app.controls.setUnavailable("pos.pro")`: adding hardware is refused as unavailable).
691
692
  In every case a sale still goes through and existing printers and terminals keep working.
693
+ For an Accounting gate (`plan.accountingEdition`, needs controls 0.3.0 or later), cover each
694
+ edition you branch on (`app.controls.set("plan.accountingEdition", "small")`), no Accounting
695
+ plan (`set(..., null)`: Accounting is hidden and its writes refused) and unknown
696
+ (`setUnavailable("plan.accountingEdition")`: new records are refused with a retry message while
697
+ existing ones stay readable). Never assert that unknown behaves like `null`.
692
698
 
693
699
  ### Receipt layout and printer capabilities
694
700
 
package/dist/index.js CHANGED
@@ -4618,6 +4618,7 @@ var DEFAULTS = {
4618
4618
  "plan.locations": { included: 3, max: null, extraMonthly: { amount: 990, currency: "THB" } },
4619
4619
  "plan.multiEntity": true,
4620
4620
  "pos.pro": { locations: null },
4621
+ "plan.accountingEdition": "medium",
4621
4622
  "payments.provider": "beam",
4622
4623
  "payments.methods": { card: true, promptPay: true }
4623
4624
  };
package/dist/index.mjs CHANGED
@@ -4579,6 +4579,7 @@ var DEFAULTS = {
4579
4579
  "plan.locations": { included: 3, max: null, extraMonthly: { amount: 990, currency: "THB" } },
4580
4580
  "plan.multiEntity": true,
4581
4581
  "pos.pro": { locations: null },
4582
+ "plan.accountingEdition": "medium",
4582
4583
  "payments.provider": "beam",
4583
4584
  "payments.methods": { card: true, promptPay: true }
4584
4585
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stardeck-customer-apps/testing",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Vitest test harness for Stardeck customer apps — in-process Postgres (PGlite) plus a control-plane simulator so the real Stardeck SDKs run unmodified in tests",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",