diff --git a/Makefile b/Makefile index dce61fea6f..bc213246df 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,7 @@ install-front: .PHONY: run-back ##LOCAL ▶️ Run backend API run-back: run-stubbed-apis docker compose up -d --quiet-pull --wait db keycloak - cd backend && MONITORFISH_KEYCLOAK_PROXY_ENABLED=true FRONTEND_OIDC_PROXY_URL=http://localhost:8085 ./gradlew bootRun --args='--spring.profiles.active=local --spring.config.additional-location=$(INFRA_FOLDER)' + cd backend && MONITORFISH_KEYCLOAK_PROXY_ENABLED=true MONITORFISH_OIDC_PROXY_URL=http://localhost:8085 ./gradlew bootRun --args='--spring.profiles.active=local --spring.config.additional-location=$(INFRA_FOLDER)' .PHONY: run-front ##LOCAL ▶️ Run frontend for development run-front: diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 31c2b162d1..78adf93384 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -56,6 +56,3 @@ monitorfish.sentry.dsn=${sentry.dsn} # Multipart uploads spring.servlet.multipart.max-file-size=5MB - -# Keycloak proxy for EE tests -monitorfish.keycloak.proxy.enabled=${monitorfish.keycloak.proxy.enabled} diff --git a/frontend/puppeteer/e2e/missions.spec.ts b/frontend/puppeteer/e2e/missions.spec.ts index a54cf20d3d..c6e5b29442 100644 --- a/frontend/puppeteer/e2e/missions.spec.ts +++ b/frontend/puppeteer/e2e/missions.spec.ts @@ -28,7 +28,7 @@ describe('Missions Form', () => { /* eslint-disable no-restricted-syntax */ for (const page of [pageA, pageB]) { - await login(page, URL) + await page.goto(path, { waitUntil: 'domcontentloaded' }) await wait(2000) await page.waitForSelector('[title="Missions et contrôles"]') @@ -64,14 +64,14 @@ describe('Missions Form', () => { await wait(2000) const controlUnitContact = await pageA.waitForSelector('[name="mission_control_unit_contact_0"]') // Modify contact on first page - await controlUnitContact.click({ count: 3, delay: 50 }) + await controlUnitContact.click({ clickCount: 3, delay: 50 }) await controlUnitContact.type('A new tel. number', { delay: 50 }) // Wait for the update to be sent await wait(1000) // Should send the update to the second page expect(await getInputContent(pageB, '[name="mission_control_unit_contact_0"]')).toBe('A new tel. number') // Erase the value - await controlUnitContact.click({ count: 3, delay: 50 }) + await controlUnitContact.click({ clickCount: 3, delay: 50 }) await controlUnitContact.type('contact', { delay: 50 }) await wait(1000) @@ -82,7 +82,7 @@ describe('Missions Form', () => { await pageA.focus('[name="observationsCnsp"]') const observationsCnsp = await pageB.waitForSelector('[name="observationsCnsp"]') // Modify contact on first page - await observationsCnsp.click({ count: 3, delay: 50 }) + await observationsCnsp.click({ clickCount: 3, delay: 50 }) await observationsCnsp.type("A new observation, as I'm not sure of the purpose of this mission.", { delay: 25 }) // Wait for the update to be sent await wait(1000) @@ -91,7 +91,7 @@ describe('Missions Form', () => { "A new observation, as I'm not sure of the purpose of this mission." ) // Erase the value - await observationsCnsp.click({ count: 3, delay: 50 }) + await observationsCnsp.click({ clickCount: 3, delay: 50 }) await observationsCnsp.type('Aucune', { delay: 50 }) await wait(1000) @@ -102,14 +102,14 @@ describe('Missions Form', () => { await pageB.focus('[name="observationsCacem"]') const observationsCacem = await pageA.waitForSelector('[name="observationsCacem"]') // Modify contact on first page - await observationsCacem.click({ count: 3 }) + await observationsCacem.click({ clickCount: 3 }) await observationsCacem.type('A new observation for this mission.', { delay: 25 }) // Wait for the update to be sent await wait(1000) // Should send the update to the second page expect(await getInputContent(pageB, '[name="observationsCacem"]')).toBe('A new observation for this mission.') // Erase the value - await observationsCacem.click({ count: 3 }) + await observationsCacem.click({ clickCount: 3 }) await observationsCacem.type('Aucune', { delay: 50 }) await wait(1000) @@ -120,14 +120,14 @@ describe('Missions Form', () => { await pageB.focus('[name="openBy"]') const openBy = await pageB.waitForSelector('[name="openBy"]') // Modify contact on first page - await openBy.click({ count: 3 }) + await openBy.click({ clickCount: 3 }) await openBy.type('LTH', { delay: 50 }) // Wait for the update to be sent await wait(1000) // Should send the update to the second page expect(await getInputContent(pageA, '[name="openBy"]')).toBe('LTH') // Erase the value - await openBy.click({ count: 3 }) + await openBy.click({ clickCount: 3 }) await openBy.type('FDJ', { delay: 50 }) await wait(2000) }, diff --git a/infra/docker/docker-compose.puppeteer.yml b/infra/docker/docker-compose.puppeteer.yml index cdf2e7e5bb..7407c9a49f 100644 --- a/infra/docker/docker-compose.puppeteer.yml +++ b/infra/docker/docker-compose.puppeteer.yml @@ -58,8 +58,6 @@ services: - FRONTEND_OIDC_CLIENT_ID=monitorfish - MONITORFISH_OIDC_ENABLED=false - MONITORFISH_SCHEDULING_ENABLED=false - - MONITORFISH_OIDC_PROXY_URL=http://keycloak:8085 - - MONITORFISH_KEYCLOAK_PROXY_ENABLED=true - FRONTEND_OIDC_ENABLED=false - FRONTEND_OIDC_REDIRECT_URI=http://0.0.0.0:8880 - FRONTEND_OIDC_LOGOUT_REDIRECT_URI=http://0.0.0.0:8880/login @@ -121,6 +119,8 @@ services: - MONITORENV_OIDC_CACHE_IN_MINUTES=${MONITORENV_OIDC_CACHE_IN_MINUTES} - MONITORENV_OIDC_ENABLED=${MONITORENV_OIDC_ENABLED} - MONITORENV_OIDC_ISSUER_URI=${MONITORENV_OIDC_ISSUER_URI} + - MONITORFISH_OIDC_PROXY_URL= + - MONITORFISH_KEYCLOAK_PROXY_ENABLED=false - MONITORENV_SENTRY_ENABLED=${MONITORENV_SENTRY_ENABLED} - RAPPORTNAV_URL=${RAPPORTNAV_URL} - SENTRY_DSN=${SENTRY_DSN}