Skip to content

Commit

Permalink
Update e2e tests following test data update
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Aug 21, 2024
1 parent 5e9b7c7 commit 4990658
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { editSideWindowPriorNotification } from '../logbook_prior_notification_form/utils'
import { editSideWindowPriorNotification } from './utils'

context('Side Window > Logbook Prior Notification Form > Behavior', () => {
it("Should show a banner, freeze the logbook prior notification form and button when it's in pending send", () => {
editSideWindowPriorNotification(`DES BARS`, 'FAKE_OPERATION_107')
editSideWindowPriorNotification(`LEVE NEDERLAND`, 'FAKE_OPERATION_105')

cy.get('.Component-Banner').contains(`Le préavis est en cours de diffusion.`)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ context('Side Window > Logbook Prior Notification Form > Form', () => {
// Given
openSideWindowPriorNotificationListAsSuperUser()
cy.get('[data-cy="side-window-sub-menu-ALL"]').click()
cy.fill('Rechercher un navire', 'ANCRE')
cy.fill('Rechercher un navire', 'THON')

cy.getTableRowById('FAKE_OPERATION_109_COR').find('[title="Préavis invalidé"]').should('not.exist')
cy.getTableRowById('FAKE_OPERATION_110').find('[title="Préavis invalidé"]').should('not.exist')

cy.getTableRowById('FAKE_OPERATION_109_COR').clickButton('Éditer le préavis')
cy.getTableRowById('FAKE_OPERATION_110').clickButton('Éditer le préavis')
if (document.querySelector('[data-cy="first-loader"]')) {
cy.getDataCy('first-loader').should('not.be.visible')
}
Expand All @@ -144,6 +144,6 @@ context('Side Window > Logbook Prior Notification Form > Form', () => {

cy.clickButton('Fermer')

cy.getTableRowById('FAKE_OPERATION_109_COR').find('[title="Préavis invalidé"]').should('exist')
cy.getTableRowById('FAKE_OPERATION_110').find('[title="Préavis invalidé"]').should('exist')
})
})

0 comments on commit 4990658

Please sign in to comment.