test(ui): pin the exact OAuth scopes Prowler asks Slack for

This commit is contained in:
Pablo F.G
2026-08-18 17:40:26 +02:00
parent 23d6c77a78
commit 6adbb75ca9
@@ -43,9 +43,9 @@ describe("starting the install", () => {
expect(`${consentScreen.origin}${consentScreen.pathname}`).toBe( expect(`${consentScreen.origin}${consentScreen.pathname}`).toBe(
"https://slack.com/oauth/v2/authorize", "https://slack.com/oauth/v2/authorize",
); );
expect((consentScreen.searchParams.get("scope") ?? "").split(",")).toEqual( const scopes = (consentScreen.searchParams.get("scope") ?? "").split(",");
expect.arrayContaining(REQUIRED_SCOPES), expect(scopes).toHaveLength(REQUIRED_SCOPES.length);
); expect(scopes).toEqual(expect.arrayContaining(REQUIRED_SCOPES));
// The state is server-minted, binding this install to the session // The state is server-minted, binding this install to the session
// (design D5). // (design D5).
expect(consentScreen.searchParams.get("state")).toBeTruthy(); expect(consentScreen.searchParams.get("state")).toBeTruthy();