diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index c8b09431c..d6c511b71 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -47,8 +47,6 @@ beforeEach(() => { // so that we can detect when the browser app is running in Cypress. // https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-preserve-cookies--localStorage-in-between-my-tests cy.session('cypress', () => { - cy.window().then(window => { - window.localStorage.setItem('IS_CYPRESS', 'true') - }) + window.localStorage.setItem('IS_CYPRESS', 'true') }) }) diff --git a/frontend/src/components/Menu.tsx b/frontend/src/components/Menu.tsx index b93949c3e..4c3f39bc7 100644 --- a/frontend/src/components/Menu.tsx +++ b/frontend/src/components/Menu.tsx @@ -1,7 +1,6 @@ import { Account } from '@features/Account/components/Account' import { ControlUnitListButton } from '@features/ControlUnit/components/ControlUnitListButton' import { DashboardMapButton } from '@features/Dashboard/components/DashboardMapButton' -import { isDashboardEnabled } from '@features/Dashboard/utils' import { InterestPointMapButton } from '@features/InterestPoint/components/InterestPointMapButton' import { MeasurementMapButton } from '@features/map/tools/measurements/MeasurementMapButton' import { MissionsMenu } from '@features/missions/MissionsButton' @@ -51,7 +50,7 @@ export function Menu({ isSuperUser }: MenuProps) { )} - {displayDashboard && isDashboardEnabled() && isSuperUser && ( + {displayDashboard && isSuperUser && (
  • diff --git a/frontend/src/domain/shared_slices/Global.ts b/frontend/src/domain/shared_slices/Global.ts index be59ded67..bc12e8005 100644 --- a/frontend/src/domain/shared_slices/Global.ts +++ b/frontend/src/domain/shared_slices/Global.ts @@ -1,6 +1,7 @@ // TODO This slice should disappear in favor of `features/MainWindow/slice.ts` and "Map" feature should have its own slice. // TODO "Map" feature should have its own slice where we would transfer the related `display...` props. +import { isDashboardEnabled } from '@features/Dashboard/utils' import { createSelector, createSlice, type PayloadAction } from '@reduxjs/toolkit' import type { MapToolType } from '../entities/map/constants' @@ -100,7 +101,7 @@ const initialState: GlobalStateType = { displayLocateOnMap: true, displayMeasurement: true, displayInterestPoint: true, - displayDashboard: true, + displayDashboard: true && isDashboardEnabled(), displaySearchSemaphoreButton: true, displayReportingsButton: true, displayRightMenuControlUnitListButton: true,