test(sharing): follow the invite form's new scope default and one-line copy

The access options render as a row with an info affordance rather than a
wrapping label, the scope question preselects nothing, and the write and
manage detail moved behind the (i). Point the consent-copy and form-reset
guards at the shipped bundle for the detail text and at the unset scope
default.
This commit is contained in:
Marc-André Bombeck committed 2026-08-08 21:20:57 +02:00
1 parent e0692efba8
commit f6a4acf779
2 files changed
+46 -18

No files matched your search

@@ -353,8 +353,9 @@ describe("a refused invitation keeps what was typed", () => {
const split = INVITE_CARD.indexOf("onError:", start);
// The options object ends at the first ` },` after the error arm, so
// the slice stops at the mutation rather than running into the JSX below,
// where a `setNarrowed(false)` on a radio would satisfy the matcher for
// the wrong reason.
// where a `setNarrowed(false)` / `setNarrowed(true)` on a radio would
// satisfy the matcher for the wrong reason. The success reset returns the
// scope to unset (`null`), which the JSX never writes.
const end = INVITE_CARD.indexOf("\n },", split);
const onSuccess = INVITE_CARD.slice(start, split);
const onError = INVITE_CARD.slice(split, end);
@@ -367,7 +368,7 @@ describe("a refused invitation keeps what was typed", () => {
'setIdentifier("")',
'setExpiresOn("")',
'setAccess("READ")',
"setNarrowed(false)",
"setNarrowed(null)",
"setSections([])",
]) {
expect(onSuccess, reset).toContain(reset);