Skip to content

Commit

Permalink
fix: test e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeperrault committed Sep 18, 2024
1 parent 0400fe9 commit 6cfb946
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions frontend/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})
3 changes: 1 addition & 2 deletions frontend/src/components/Menu.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -51,7 +50,7 @@ export function Menu({ isSuperUser }: MenuProps) {
<ControlUnitListButton />
</li>
)}
{displayDashboard && isDashboardEnabled() && isSuperUser && (
{displayDashboard && isSuperUser && (
<li>
<DashboardMapButton />
</li>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/domain/shared_slices/Global.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -100,7 +101,7 @@ const initialState: GlobalStateType = {
displayLocateOnMap: true,
displayMeasurement: true,
displayInterestPoint: true,
displayDashboard: true,
displayDashboard: true && isDashboardEnabled(),
displaySearchSemaphoreButton: true,
displayReportingsButton: true,
displayRightMenuControlUnitListButton: true,
Expand Down

0 comments on commit 6cfb946

Please sign in to comment.