Skip to content

Commit

Permalink
Fix few issues
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Oct 23, 2024
1 parent e1bc6ce commit 65828ad
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions backend/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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}
18 changes: 9 additions & 9 deletions frontend/puppeteer/e2e/missions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]')
Expand Down Expand Up @@ -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)

Expand All @@ -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)
Expand All @@ -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)

Expand All @@ -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)

Expand All @@ -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)
},
Expand Down
4 changes: 2 additions & 2 deletions infra/docker/docker-compose.puppeteer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 65828ad

Please sign in to comment.