@stardeck-customer-apps/testing 0.6.1 → 0.6.2

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.
Files changed (2) hide show
  1. package/SKILL.md +38 -0
  2. package/package.json +1 -1
package/SKILL.md CHANGED
@@ -246,6 +246,44 @@ cursor, limit })`; `list()` intentionally keeps its previous array shape.
246
246
  pairing pickers via `app.edge.seedDevices()` / `seedPeripherals()`.
247
247
  - `next/headers` (`headers()`/`cookies()`) inside handlers under `callRoute`.
248
248
 
249
+ ## End-to-end (Playwright) suite
250
+
251
+ This package covers the hermetic in-process suite. The app ALSO has a separate
252
+ Playwright e2e suite: specs in `e2e/*.spec.ts`, run with `npm run test:e2e`
253
+ against the live dev server. It is NOT hermetic — real routes, real database,
254
+ the sandbox's mock admin session.
255
+
256
+ **When to use which**
257
+
258
+ - Business logic, route handlers, edge cases, error paths → this package (fast,
259
+ isolated, deterministic).
260
+ - Whole user journeys through the real UI (the flows a customer walks) → one
261
+ e2e spec per critical workflow.
262
+
263
+ **Which flows get an e2e spec** (full guidance: `e2e/README.md`)
264
+
265
+ One spec per critical workflow — "if this broke overnight, would the owner
266
+ lose money or trust?" The flow types worth a journey: core transactions
267
+ (cart → checkout → confirmation), creation → visibility (post a review →
268
+ see it on the page), state transitions (order placed → fulfilled → status
269
+ updates), cross-surface handoffs (storefront order → admin order list). NOT
270
+ worth one: render-existence checks, admin CRUD minutiae, static pages,
271
+ per-field validation (unit-test the route), login/logout (platform-provided).
272
+
273
+ **E2e rules** (mirror `e2e/README.md`)
274
+
275
+ - Whole journeys only: start at the flow's real entry page, end by asserting
276
+ the durable user-visible outcome — never render-existence checks ("button
277
+ renders", "page loads"). One happy path per workflow first; error plumbing
278
+ stays in this package's suite.
279
+ - Group with `test.describe("workflow:<Name>")` using the same names as your
280
+ `describeWorkflow` blocks where they overlap.
281
+ - Specs create uniquely-named data INSIDE the test body (retries re-run it)
282
+ and clean up after themselves.
283
+ - Flake killers: user-facing locators (`getByRole`/`getByLabel`) over CSS,
284
+ never `waitForTimeout` (web-first assertions auto-wait), every test
285
+ independent of other tests' data and ordering.
286
+
249
287
  ## Rules
250
288
 
251
289
  - Test **business logic and route handlers**, not framework plumbing. Focus on
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stardeck-customer-apps/testing",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
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",