From 2d3a316126b3c372a1973671a9710930bbdfbb55 Mon Sep 17 00:00:00 2001 From: Maxime Perrault Date: Wed, 7 Aug 2024 15:40:21 +0200 Subject: [PATCH] fix: test e2e --- .../e2e/main_window/reporting/create_reporting.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/cypress/e2e/main_window/reporting/create_reporting.spec.ts b/frontend/cypress/e2e/main_window/reporting/create_reporting.spec.ts index 83ccca7b28..fa5b9f2f66 100644 --- a/frontend/cypress/e2e/main_window/reporting/create_reporting.spec.ts +++ b/frontend/cypress/e2e/main_window/reporting/create_reporting.spec.ts @@ -131,6 +131,7 @@ context('Reporting', () => { if (!interception.response) { assert.fail('`interception.response` is undefined.') } + const reportingId = interception.request.body.id assert.deepInclude(omit(interception.request.body, 'reportingSources[0].id'), { missionId: 33, openBy: 'XYZ', @@ -138,7 +139,7 @@ context('Reporting', () => { { controlUnitId: null, displayedSource: 'Sémaphore de Dieppe', - reportingId: 13, + reportingId, semaphoreId: 35, sourceName: null, sourceType: 'SEMAPHORE' @@ -170,13 +171,14 @@ context('Reporting', () => { } cy.get(interception.request.body.attachedToMissionAtUtc).should('not.be.null') cy.get(interception.request.body.detachedToMissionAtUtc).should('not.be.null') + const reportingId = interception.request.body.id assert.deepInclude(omit(interception.request.body, 'reportingSources[0].id'), { openBy: 'XYZ', reportingSources: [ { controlUnitId: null, displayedSource: 'Sémaphore de Dieppe', - reportingId: 13, + reportingId, semaphoreId: 35, sourceName: null, sourceType: 'SEMAPHORE'