From 6fbac7a8fb83a2be1e78d54319328d3761678b6b Mon Sep 17 00:00:00 2001 From: Ivan Gabriele Date: Thu, 15 Aug 2024 17:14:02 +0200 Subject: [PATCH] Remove non-acknowldged prior notification e2e test case --- .../error_handling.spec.ts | 4 +-- .../prior_notification_card/card.spec.ts | 29 ++++--------------- .../error_handling.spec.ts | 2 +- 3 files changed, 8 insertions(+), 27 deletions(-) diff --git a/frontend/cypress/e2e/side_window/logbook_prior_notification_form/error_handling.spec.ts b/frontend/cypress/e2e/side_window/logbook_prior_notification_form/error_handling.spec.ts index 16c00cedf5..26100c5f9b 100644 --- a/frontend/cypress/e2e/side_window/logbook_prior_notification_form/error_handling.spec.ts +++ b/frontend/cypress/e2e/side_window/logbook_prior_notification_form/error_handling.spec.ts @@ -4,7 +4,7 @@ import { editSideWindowPriorNotification } from '../manual_prior_notification_fo context('Side Window > Logbook Prior Notification Form > Error Handling', () => { const failedQueryCount = RTK_MAX_RETRIES + 1 - const url = '/bff/v1/prior_notifications/FAKE_OPERATION_109?isManuallyCreated=false&operationDate=*' + const url = '/bff/v1/prior_notifications/FAKE_OPERATION_109_COR?isManuallyCreated=false&operationDate=*' it('Should handle fetching error as expected', () => { cy.intercept( @@ -18,7 +18,7 @@ context('Side Window > Logbook Prior Notification Form > Error Handling', () => } ).as('getPriorNotificationsWithError') - editSideWindowPriorNotification(`L'ANCRE`, 'FAKE_OPERATION_109') + editSideWindowPriorNotification(`L'ANCRE`, 'FAKE_OPERATION_109_COR') for (let i = 1; i <= failedQueryCount; i += 1) { cy.wait('@getPriorNotificationsWithError') diff --git a/frontend/cypress/e2e/side_window/prior_notification_card/card.spec.ts b/frontend/cypress/e2e/side_window/prior_notification_card/card.spec.ts index 12e30851b9..5394da59fa 100644 --- a/frontend/cypress/e2e/side_window/prior_notification_card/card.spec.ts +++ b/frontend/cypress/e2e/side_window/prior_notification_card/card.spec.ts @@ -59,27 +59,8 @@ context('Side Window > Prior Notification Card > Card', () => { cy.contains(`25 kg`).should('be.visible') }) - it('Should display a failed acknowledged message as expected', () => { - openSideWindowPriorNotification(`CALAMARO`) - - // Title - cy.contains(`Préavis navire ≥ 12 M`).should('be.visible') - cy.contains(`CALAMARO (CFR105)`).should('be.visible') - - // Message Header - cy.contains(`PNO`).should('be.visible') - cy.contains(`Préavis (notification de retour au port)`).should('be.visible') - - // Message Body - cy.getDataCy('LogbookMessage-failed-acknowledgement-icon').should('be.visible') - cy.contains(`Saint-Malo (FRSML)`).should('be.visible') - cy.contains(`Débarquement (LAN)`).should('be.visible') - cy.contains(`BAUDROIE (ANF)`).should('be.visible') - cy.contains(`150 kg`).should('be.visible') - }) - it('Should refresh the list when the opened prior notification data differs from its entry in the current list', () => { - const url = '/bff/v1/prior_notifications/FAKE_OPERATION_109?isManuallyCreated=false&operationDate=*' + const url = '/bff/v1/prior_notifications/FAKE_OPERATION_109_COR?isManuallyCreated=false&operationDate=*' cy.intercept({ method: 'GET', @@ -112,7 +93,7 @@ context('Side Window > Prior Notification Card > Card', () => { }) it('Should display a warning banner and refresh the list when the opened prior notification has been deleted', () => { - const url = '/bff/v1/prior_notifications/FAKE_OPERATION_109?isManuallyCreated=false&operationDate=*' + const url = '/bff/v1/prior_notifications/FAKE_OPERATION_109_COR?isManuallyCreated=false&operationDate=*' cy.intercept({ method: 'GET', @@ -250,11 +231,11 @@ context('Side Window > Prior Notification Card > Card', () => { cy.get('[data-cy="side-window-sub-menu-ALL"]').click() cy.fill('Rechercher un navire', 'ANCRE') - cy.getTableRowById('FAKE_OPERATION_109' as any) + cy.getTableRowById('FAKE_OPERATION_109_COR' as any) .find('[title="Préavis invalidé"]') .should('not.exist') - cy.getTableRowById('FAKE_OPERATION_109' as any).clickButton('Éditer le préavis') + cy.getTableRowById('FAKE_OPERATION_109_COR' as any).clickButton('Éditer le préavis') if (document.querySelector('[data-cy="first-loader"]')) { cy.getDataCy('first-loader').should('not.be.visible') } @@ -269,7 +250,7 @@ context('Side Window > Prior Notification Card > Card', () => { cy.clickButton('Fermer') - cy.getTableRowById('FAKE_OPERATION_109' as any) + cy.getTableRowById('FAKE_OPERATION_109_COR' as any) .find('[title="Préavis invalidé"]') .should('exist') }) diff --git a/frontend/cypress/e2e/side_window/prior_notification_card/error_handling.spec.ts b/frontend/cypress/e2e/side_window/prior_notification_card/error_handling.spec.ts index 1c9e81c2a9..0250ec3fa4 100644 --- a/frontend/cypress/e2e/side_window/prior_notification_card/error_handling.spec.ts +++ b/frontend/cypress/e2e/side_window/prior_notification_card/error_handling.spec.ts @@ -4,7 +4,7 @@ import { openSideWindowPriorNotification } from './utils' context('Side Window > Logbook Prior Notification Card > Error Handling', () => { const failedQueryCount = RTK_MAX_RETRIES + 1 - const url = '/bff/v1/prior_notifications/FAKE_OPERATION_109?isManuallyCreated=false&operationDate=*' + const url = '/bff/v1/prior_notifications/FAKE_OPERATION_109_COR?isManuallyCreated=false&operationDate=*' beforeEach(() => { cy.intercept('/bff/v1/authorization/current', { statusCode: 401 }).as('getIsSuperUser')