From cd4f3f760e5e088cc5c7dbe0a0f3a5f46b6c4c8d Mon Sep 17 00:00:00 2001 From: Thibault Reidy Date: Mon, 20 Nov 2023 16:09:46 +0100 Subject: [PATCH] fix: add redirection host environment variable in cypress CI --- .github/workflows/cypress.yml | 3 +++ cypress/e2e/item/shortLink/shortLink.cy.ts | 4 ++-- src/components/App.tsx | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 712fd7124..5464b814d 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -43,6 +43,7 @@ jobs: VITE_GRAASP_LIBRARY_HOST: ${{ vars.VITE_GRAASP_LIBRARY_HOST }} VITE_GRAASP_ANALYZER_HOST: ${{ vars.VITE_GRAASP_ANALYZER_HOST }} VITE_SHOW_NOTIFICATIONS: ${{ vars.VITE_SHOW_NOTIFICATIONS }} + VITE_GRAASP_REDIRECTION_HOST: "http://localhost:3030" # use the Cypress GitHub Action to run Cypress tests within the chrome browser - name: Cypress run @@ -66,6 +67,8 @@ jobs: VITE_GRAASP_LIBRARY_HOST: ${{ vars.VITE_GRAASP_LIBRARY_HOST }} VITE_GRAASP_ANALYZER_HOST: ${{ vars.VITE_GRAASP_ANALYZER_HOST }} VITE_SHOW_NOTIFICATIONS: ${{ vars.VITE_SHOW_NOTIFICATIONS }} + # TODO: add REDIRECTION_HOST ! + VITE_GRAASP_REDIRECTION_HOST: "http://localhost:3030" # after the test run completes # store any screenshots diff --git a/cypress/e2e/item/shortLink/shortLink.cy.ts b/cypress/e2e/item/shortLink/shortLink.cy.ts index b158dd115..a94144a81 100644 --- a/cypress/e2e/item/shortLink/shortLink.cy.ts +++ b/cypress/e2e/item/shortLink/shortLink.cy.ts @@ -140,7 +140,7 @@ describe('Short links', () => { it('Patch short link', () => { const NEW_SHORT_LINK = 'test-10'; - const NEW_PLATFORM = Context.Library; + const NEW_PLATFORM = Context.Builder; const PATCH_ALIAS = shortLinks[0].alias; cy.visit(buildItemPath(itemId)); @@ -185,7 +185,7 @@ describe('Short links', () => { }); it('Patch short link with random alias', () => { - const NEW_PLATFORM = Context.Library; + const NEW_PLATFORM = Context.Builder; const PATCH_ALIAS = shortLinks[0].alias; cy.visit(buildItemPath(itemId)); diff --git a/src/components/App.tsx b/src/components/App.tsx index 634e21d7b..34b6b4421 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -4,6 +4,7 @@ import { Route, Routes } from 'react-router-dom'; import { saveUrlForRedirection } from '@graasp/sdk'; import { CustomInitialLoader, withAuthorization } from '@graasp/ui'; +// TODO: uncomments Sentry code // import * as Sentry from '@sentry/react'; import { DOMAIN } from '@/config/env'; import { SIGN_IN_PATH } from '@/config/externalPaths';