@terpjs/conformance 0.9.0 → 0.10.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/dist/index.d.ts CHANGED
@@ -38,6 +38,16 @@ export declare function login(page: Page, credentials?: {
38
38
  * user menu (avatar at the bottom of every Terp app's sidebar) opens Settings and Sign out;
39
39
  * sign-out revokes the token server-side (ADR 0031), so this is reusable across apps. Success
40
40
  * is the app shell being replaced by the sign-in screen.
41
+ *
42
+ * The trigger is located by its marker rather than by an accessible name, and that is a fix
43
+ * rather than a shortcut. The name is deliberately not fixed: expanded, the button renders the
44
+ * user's own email and role as visible text and takes its name from them, because an
45
+ * `aria-label` REPLACES subtree text in the accessible name and would leave a voice-control
46
+ * user with nothing to say that matches what they see (WCAG 2.5.3, Label in Name). Only the
47
+ * collapsed icon rail carries a label, where the avatar is aria-hidden and the button would
48
+ * otherwise have no name at all. So the name varies with the shell state AND with the signed-in
49
+ * user, which makes it the wrong axis for an app-agnostic helper; `data-terp` is the stable one,
50
+ * being a pinned inventory whose renames are release notes.
41
51
  */
42
52
  export declare function logout(page: Page): Promise<void>;
43
53
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;CAGjB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;CAGlB,CAAC;AAEF,eAAO,MAAM,MAAM;;;CAGlB,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,KAAK,CACzB,IAAI,EAAE,IAAI,EACV,WAAW,GAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAU,GACvD,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;;;GAKG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAItD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;GAKG;AACH,eAAO,MAAM,KAAK;;;CAGjB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;;CAGlB,CAAC;AAEF,eAAO,MAAM,MAAM;;;CAGlB,CAAC;AAEF;;;;;GAKG;AACH,wBAAsB,KAAK,CACzB,IAAI,EAAE,IAAI,EACV,WAAW,GAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAU,GACvD,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAItD"}
package/dist/index.js CHANGED
@@ -44,9 +44,19 @@ export async function login(page, credentials = ADMIN) {
44
44
  * user menu (avatar at the bottom of every Terp app's sidebar) opens Settings and Sign out;
45
45
  * sign-out revokes the token server-side (ADR 0031), so this is reusable across apps. Success
46
46
  * is the app shell being replaced by the sign-in screen.
47
+ *
48
+ * The trigger is located by its marker rather than by an accessible name, and that is a fix
49
+ * rather than a shortcut. The name is deliberately not fixed: expanded, the button renders the
50
+ * user's own email and role as visible text and takes its name from them, because an
51
+ * `aria-label` REPLACES subtree text in the accessible name and would leave a voice-control
52
+ * user with nothing to say that matches what they see (WCAG 2.5.3, Label in Name). Only the
53
+ * collapsed icon rail carries a label, where the avatar is aria-hidden and the button would
54
+ * otherwise have no name at all. So the name varies with the shell state AND with the signed-in
55
+ * user, which makes it the wrong axis for an app-agnostic helper; `data-terp` is the stable one,
56
+ * being a pinned inventory whose renames are release notes.
47
57
  */
48
58
  export async function logout(page) {
49
- await page.getByRole("button", { name: "Account menu" }).click();
59
+ await page.locator('[data-terp="user-menu"] [data-terp="menu-trigger"]').click();
50
60
  await page.getByRole("menuitem", { name: "Sign out" }).click();
51
61
  await expect(page.getByRole("heading", { name: "Sign in" })).toBeVisible();
52
62
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,MAAM,kBAAkB,CAAC;AAErD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,iBAAiB;IAC5D,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,8BAA8B;CAChF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,kBAAkB;IAC9D,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,8BAA8B;CACjF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,kBAAkB;IAC9D,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,8BAA8B;CACjF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,IAAU,EACV,cAAmD,KAAK;IAExD,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAC3E,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,C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AAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAC/D,MAAM,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;AAC7E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terpjs/conformance",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "description": "Terp conformance \u2014 app-agnostic Playwright end-to-end flows over a running Terp stack (base profile: auth gating + session lifecycle) plus the login/role helpers an app's own e2e suite composes.",
6
6
  "main": "./dist/index.js",