From 050b0d1230445d5f883fc29b27a02814f77c3239 Mon Sep 17 00:00:00 2001 From: Ivan Gabriele Date: Thu, 22 Aug 2024 16:38:51 +0200 Subject: [PATCH] Update manual prior notification form e2e tests --- .../manual_prior_notification_form/behavior.spec.ts | 2 +- .../manual_prior_notification_form/form.spec.ts | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/cypress/e2e/side_window/manual_prior_notification_form/behavior.spec.ts b/frontend/cypress/e2e/side_window/manual_prior_notification_form/behavior.spec.ts index fa2a68bfa4..1acfeeddc2 100644 --- a/frontend/cypress/e2e/side_window/manual_prior_notification_form/behavior.spec.ts +++ b/frontend/cypress/e2e/side_window/manual_prior_notification_form/behavior.spec.ts @@ -64,7 +64,7 @@ context('Side Window > Manual Prior Notification Form > Behavior', () => { cy.fill('Espèces à bord et à débarquer', 'AAX') cy.fill('Poids (AAX)', 25) cy.fill('Engins utilisés', ['OTP'], { index: 1 }) - cy.fill('Zone de pêche', '21.4.T') + cy.fill('Zone globale de capture', '21.4.T') cy.fill('Saisi par', 'ABC') cy.clickButton('Créer le préavis') diff --git a/frontend/cypress/e2e/side_window/manual_prior_notification_form/form.spec.ts b/frontend/cypress/e2e/side_window/manual_prior_notification_form/form.spec.ts index d5254f7a6b..7fc1d7b502 100644 --- a/frontend/cypress/e2e/side_window/manual_prior_notification_form/form.spec.ts +++ b/frontend/cypress/e2e/side_window/manual_prior_notification_form/form.spec.ts @@ -62,36 +62,42 @@ context('Side Window > Manual Prior Notification Form > Form', () => { assert.isString(createdPriorNotification.reportId) assert.isTrue(isDateCloseTo(createdPriorNotification.sentAt, now, 15)) assert.deepInclude(createdPriorNotification.fishingCatches, { + faoArea: null, quantity: null, specyCode: 'AAX', specyName: 'AAPTOSYAX GRYPUS', weight: 25.0 }) assert.deepInclude(createdPriorNotification.fishingCatches, { + faoArea: null, quantity: null, specyCode: 'BFT', specyName: 'THON ROUGE', weight: 150.0 }) assert.deepInclude(createdPriorNotification.fishingCatches, { + faoArea: null, quantity: 4.0, specyCode: 'BF1', specyName: 'THON ROUGE + 30 KG', weight: 40.0 }) assert.deepInclude(createdPriorNotification.fishingCatches, { + faoArea: null, quantity: 5.0, specyCode: 'BF2', specyName: 'THON ROUGE 8 À 30 KG', weight: 50.0 }) assert.deepInclude(createdPriorNotification.fishingCatches, { + faoArea: null, quantity: 6.0, specyCode: 'BF3', specyName: 'THON ROUGE 6.4 À 8 KG', weight: 60.0 }) assert.deepInclude(createdPriorNotification.fishingCatches, { + faoArea: null, quantity: 20.0, specyCode: 'SWO', specyName: 'ESPADON', @@ -102,7 +108,7 @@ context('Side Window > Manual Prior Notification Form > Form', () => { didNotFishAfterZeroNotice: false, expectedArrivalDate: arrivalDateAsString, expectedLandingDate: landingDateAsString, - faoArea: '21.4.T', + globalFaoArea: '21.4.T', note: "Un point d'attention.", portLocode: 'FRVNE', tripGearCodes: ['OTP', 'PTB'], @@ -259,6 +265,7 @@ context('Side Window > Manual Prior Notification Form > Form', () => { assert.isString(createdPriorNotification.reportId) assert.isTrue(isDateCloseTo(createdPriorNotification.sentAt, now, 15)) assert.deepInclude(createdPriorNotification.fishingCatches, { + faoArea: null, quantity: null, specyCode: 'COD', specyName: 'MORUE COMMUNE (CABILLAUD)', @@ -270,7 +277,7 @@ context('Side Window > Manual Prior Notification Form > Form', () => { expectedArrivalDate: arrivalDateAsString, // Should be the same as the arrival date since we checked "équivalentes à celles de l'arrivée au port" expectedLandingDate: arrivalDateAsString, - faoArea: '27.7.d', + globalFaoArea: '27.7.d', note: null, portLocode: 'FRVNE', tripGearCodes: ['OTB'], @@ -320,7 +327,7 @@ context('Side Window > Manual Prior Notification Form > Form', () => { assert.includeMembers(updatedPriorNotification.tripGearCodes, ['OTB', 'TB']) assert.deepInclude(updatedPriorNotification, { ...omit(createdPriorNotification, ['tripGearCodes', 'updatedAt']), - faoArea: '27.5.b', + globalFaoArea: '27.5.b', reportId: createdPriorNotification.reportId })