@stardeck-customer-apps/testing 0.29.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,9 @@ 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`, `payments.provider: "beam"`, `payments.methods: { card: true, promptPay: true }`.
673
+ `plan.multiEntity: true`, `pos.pro: { locations: null }` (unlimited),
674
+ `plan.accountingEdition: "medium"`, `payments.provider: "beam"`,
675
+ `payments.methods: { card: true, promptPay: true }`.
674
676
  Seed with `createTestApp({ controls: { "plan.multiEntity": false } })`. Then
675
677
  `app.controls.set(key, value)` (the next `getControl` in the same process sees it: the
676
678
  controls cache is dropped on every change and on `reset()`),
@@ -683,6 +685,16 @@ cursor, limit })`; `list()` intentionally keeps its previous array shape.
683
685
  simulator answers 401 `UNAUTHENTICATED`. Only `payments.provider` and `payments.methods` are
684
686
  writable (anything else is 400 `NOT_WRITABLE`), and an invalid value is 400 `INVALID_VALUE`.
685
687
  `app.controls.clear()` returns to the seeded values. Test the `ok: false` path of every gate.
688
+ For a POS Pro hardware gate, cover all three answers: under the count
689
+ (`app.controls.set("pos.pro", { locations: 1 })` with no POS Pro location yet), at the count
690
+ (`{ locations: 0 }`, or as many as the test already set up: adding hardware is refused) and
691
+ unknown (`app.controls.setUnavailable("pos.pro")`: adding hardware is refused as unavailable).
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`.
686
698
 
687
699
  ### Receipt layout and printer capabilities
688
700
 
package/dist/index.js CHANGED
@@ -4617,6 +4617,8 @@ var DEFAULTS = {
4617
4617
  "flag.paymentsSetupStep": false,
4618
4618
  "plan.locations": { included: 3, max: null, extraMonthly: { amount: 990, currency: "THB" } },
4619
4619
  "plan.multiEntity": true,
4620
+ "pos.pro": { locations: null },
4621
+ "plan.accountingEdition": "medium",
4620
4622
  "payments.provider": "beam",
4621
4623
  "payments.methods": { card: true, promptPay: true }
4622
4624
  };
package/dist/index.mjs CHANGED
@@ -4578,6 +4578,8 @@ var DEFAULTS = {
4578
4578
  "flag.paymentsSetupStep": false,
4579
4579
  "plan.locations": { included: 3, max: null, extraMonthly: { amount: 990, currency: "THB" } },
4580
4580
  "plan.multiEntity": true,
4581
+ "pos.pro": { locations: null },
4582
+ "plan.accountingEdition": "medium",
4581
4583
  "payments.provider": "beam",
4582
4584
  "payments.methods": { card: true, promptPay: true }
4583
4585
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stardeck-customer-apps/testing",
3
- "version": "0.29.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",