@@ -45,24 +45,28 @@ Then('a consent screen is displayed', async function (this: EpdsWorld) {
4545 timeout : 30_000 ,
4646 } )
4747
48- // 2. The demo clients request `atproto transition:generic`. For that
49- // scope set, @atproto/oauth-provider-ui's ScopeDescription renders
50- // multiple permission cards — including one titled "Authenticate"
51- // via the RpcMethodsDetails component, which fires on
52- // hasTransitionGeneric. Assert that card is visible: this proves
53- // the scope was actually parsed and rendered a permission summary,
54- // not that the page loaded blank with just an Authorize button.
48+ // 2. The demo clients request two granular permission sets —
49+ // `include:org.hypercerts.authWrite` and `include:app.certified.authWrite`.
50+ // @atproto /oauth-provider-ui's ScopeDescription resolves each
51+ // permission-set lexicon and renders a permission card titled from the
52+ // set's `title` field ("Manage your Hypercerts data" / "Manage your
53+ // Certified data"). Assert those cards are visible: this proves the
54+ // scopes were actually parsed, the permission-set lexicons resolved, and
55+ // a permission summary rendered — not that the page loaded blank with
56+ // just an Authorize button.
5557 //
56- // We deliberately do NOT assert on the raw scope strings
57- // (`atproto`, `transition:generic`) being visible on the page —
58- // those only appear inside a collapsed "Technical details"
59- // <Admonition> panel that is hidden (HTML `hidden` attribute +
60- // aria-hidden="true") until the user clicks its disclosure
61- // button. Asserting on the user-facing scope card is both more
62- // meaningful (what users actually see) and more resilient
58+ // We deliberately do NOT assert on the raw scope strings (`atproto`,
59+ // `include:...`) being visible on the page — those only appear inside a
60+ // collapsed "Technical details" <Admonition> panel that is hidden (HTML
61+ // `hidden` attribute + aria-hidden="true") until the user clicks its
62+ // disclosure button. Asserting on the user-facing permission cards is
63+ // both more meaningful (what users actually see) and more resilient
6364 // (doesn't depend on the details-panel implementation).
6465 await expect (
65- page . getByRole ( 'heading' , { name : 'Authenticate' } ) ,
66+ page . getByRole ( 'heading' , { name : 'Manage your Hypercerts data' } ) ,
67+ ) . toBeVisible ( )
68+ await expect (
69+ page . getByRole ( 'heading' , { name : 'Manage your Certified data' } ) ,
6670 ) . toBeVisible ( )
6771} )
6872
0 commit comments