From cbe60163f2f36685cfc58cb38ee2a09104ad4665 Mon Sep 17 00:00:00 2001 From: Chelsea Pinka <4137008+chelseapinka@users.noreply.github.com> Date: Fri, 3 May 2024 07:55:44 -0500 Subject: [PATCH 1/2] Fix spelling of 'endpoint' and visibility of 'Access Request Denied' message (#3) * chore: fix spelling of endpoint * Removing Dev-2-1 from e2e tests * Access Request Denied should be visible after denying all access. --------- Co-authored-by: garciafdezpatricia --- .github/workflows/e2e-browser.yml | 4 ++-- e2e/accessRequest.playwright.ts | 2 +- src/session/SessionProvider.tsx | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-browser.yml b/.github/workflows/e2e-browser.yml index 82a6e675..b3c1248c 100644 --- a/.github/workflows/e2e-browser.yml +++ b/.github/workflows/e2e-browser.yml @@ -10,14 +10,14 @@ concurrency: cancel-in-progress: true jobs: e2e-browser: - runs-on: ubuntu-latest-m + runs-on: ubuntu-latest environment: name: ${{ matrix.environment-name }} continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: true matrix: - environment-name: ["ESS PodSpaces", "ESS Dev-2-1"] + environment-name: ["ESS PodSpaces"] experimental: [false] include: - environment-name: "ESS Dev-2-2" diff --git a/e2e/accessRequest.playwright.ts b/e2e/accessRequest.playwright.ts index eaa29068..5947837f 100644 --- a/e2e/accessRequest.playwright.ts +++ b/e2e/accessRequest.playwright.ts @@ -179,7 +179,7 @@ test("access request deny flow", async ({ // deny confirmation modal await page.getByTestId("modal-primary-action").click(); - await visible(page.getByText("Access Request Denied"), false, { + await visible(page.getByText("Access Request Denied"), true, { tags: ["wcag2a", "wcag21a", "wcag21aa"], }); diff --git a/src/session/SessionProvider.tsx b/src/session/SessionProvider.tsx index d656b78b..d13e0c26 100644 --- a/src/session/SessionProvider.tsx +++ b/src/session/SessionProvider.tsx @@ -94,7 +94,7 @@ export interface ISessionProvider { * @param session * @param callback The callback should mutate react state to trigger re-rendering. */ -const discoverAccessEnpoint = async ( +const discoverAccessEndpoint = async ( session: Session, callback: (endpoint: string) => void ): Promise => { @@ -124,7 +124,7 @@ const discoverAccessEnpoint = async ( endpoint = await getAccessApiEndpoint(podRoot); } catch (e: unknown) { throw new DiscoveryNotAvailable( - `Access enpoint discovery for Pod ${podRoot} failed: ${e}` + `Access endpoint discovery for Pod ${podRoot} failed: ${e}` ); } callback(endpoint); @@ -242,7 +242,7 @@ export default function SessionProvider({ useEffect(() => { if (state === "authenticated") { - discoverAccessEnpoint(session, (endpoint: string) => { + discoverAccessEndpoint(session, (endpoint: string) => { setAccessEndpoint(endpoint); }).catch((e) => { if (e instanceof Error) { From 73effa2c1eea975f43f05bcaaaeb4a01f32bab3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patricia=20Garc=C3=ADa?= <99753806+garciafdezpatricia@users.noreply.github.com> Date: Fri, 3 May 2024 19:16:32 +0200 Subject: [PATCH 2/2] Chore/spelling error (#11) * chore: fix spelling of endpoint * Removing Dev-2-1 from e2e tests Access Request Denied should be visible after denying all access. * checking for typos * fix for missing client id --------- Co-authored-by: Chelsea <4137008+chelseapinka@users.noreply.github.com> --- scripts/updateClientId.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/updateClientId.ts b/scripts/updateClientId.ts index 8e8861aa..a497780a 100644 --- a/scripts/updateClientId.ts +++ b/scripts/updateClientId.ts @@ -27,13 +27,14 @@ import { buildClientIdentifierDoc } from "../src/helpers/clientId/clientId"; const CLIENT_ID_DOC_IRI = "https://storage.inrupt.com/87048fc7-b553-4c86-95de-633e1675f0bd/AMI/clientid.jsonld"; +const clientId = process.env.CLIENT_ID; +const clientSecret = process.env.CLIENT_SECRET; + // build client id doc const clientIdDoc = buildClientIdentifierDoc( "http://localhost:3000/", - CLIENT_ID_DOC_IRI + clientId as string ); -const clientId = process.env.CLIENT_ID; -const clientSecret = process.env.CLIENT_SECRET; async function updateClientId() { // save it to pod