Skip to content

Commit

Permalink
Update e2e tests following author trigram field removal from pno forms
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Oct 16, 2024
1 parent 0d47cef commit 6f3c605
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ context('Side Window > Logbook Prior Notification Form > Form', () => {

// When
cy.fill("Points d'attention identifiés par le CNSP", "Un point d'attention.")
cy.fill('Saisi par', 'ABC')

cy.wait('@updateLogbookPriorNotification')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ context('Side Window > Manual Prior Notification Form > Behavior', () => {
cy.fill('Poids (AAX)', 25)
cy.fill('Engins utilisés', ['OTP'], { index: 1 })
cy.fill('Zone globale de capture', '21.4.T')
cy.fill('Saisi par', 'ABC')

cy.clickButton('Créer le préavis')

Expand Down Expand Up @@ -194,7 +193,6 @@ context('Side Window > Manual Prior Notification Form > Behavior', () => {
cy.fill('Espèces à bord et à débarquer', 'BFT')

cy.fill('Engins utilisés', ['OTP'], { index: 1 })
cy.fill('Saisi par', 'BOB')

cy.clickButton('Créer le préavis')

Expand Down Expand Up @@ -489,7 +487,6 @@ context('Side Window > Manual Prior Notification Form > Behavior', () => {
cy.fill('Espèces à bord et à débarquer', 'SWO')

cy.fill('Engins utilisés', ['OTP'], { index: 1 })
cy.fill('Saisi par', 'BOB')

cy.clickButton('Créer le préavis')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ context('Side Window > Manual Prior Notification Form > Form', () => {

cy.fill('Engins utilisés', ['OTP', 'PTB'], { index: 1 })
cy.fill("Points d'attention identifiés par le CNSP", "Un point d'attention.")
cy.fill('Saisi par', 'BOB')

cy.clickButton('Créer le préavis')

Expand Down Expand Up @@ -202,7 +201,6 @@ context('Side Window > Manual Prior Notification Form > Form', () => {
cy.contains('Veuillez sélectionner au moins une espèce.').should('exist')
cy.contains('Veuillez sélectionner au moins un engin.').should('exist')
cy.contains('Veuillez indiquer la zone FAO.').should('exist')
cy.contains('Veuillez indiquer votre trigramme.').should('exist')
cy.contains('Créer le préavis').should('be.disabled')

cy.getDataCy('vessel-search-input').click().wait(500)
Expand Down Expand Up @@ -239,10 +237,6 @@ context('Side Window > Manual Prior Notification Form > Form', () => {

cy.contains('Veuillez sélectionner au moins un engin.').should('not.exist')

cy.fill('Saisi par', 'BOB')

cy.contains('Veuillez indiquer votre trigramme.').should('not.exist')

cy.contains('Créer le préavis').should('be.enabled')

// -------------------------------------------------------------------------
Expand Down Expand Up @@ -306,7 +300,6 @@ context('Side Window > Manual Prior Notification Form > Form', () => {
cy.fill('Poids (COD)', 5000)

cy.fill('Engins utilisés', ['OTB'], { index: 1 })
cy.fill('Saisi par', 'BOB')

cy.wait('@computePriorNotification')
cy.getDataCy('VesselRiskFactor').contains('1.9').should('exist')
Expand Down Expand Up @@ -444,10 +437,6 @@ context('Side Window > Manual Prior Notification Form > Form', () => {
cy.fill("Points d'attention identifiés par le CNSP", "Un point d'attention.")

cy.countRequestsByAlias('@computePriorNotification', 1500).should('be.equal', 1)

cy.fill('Saisi par', 'BOB')

cy.countRequestsByAlias('@computePriorNotification', 1500).should('be.equal', 1)
})

it('Should only recalculate manual prior notification fleet segments, risk factor & types when necessary (edition)', () => {
Expand Down Expand Up @@ -492,10 +481,6 @@ context('Side Window > Manual Prior Notification Form > Form', () => {

cy.fill("Points d'attention identifiés par le CNSP", "Un point d'attention.")

// cy.countRequestsByAlias('@computePriorNotification', 1500).should('be.equal', 6)

cy.fill('Saisi par', 'BOB')

cy.countRequestsByAlias('@computePriorNotification', 1500).should('be.equal', 6)
})

Expand Down Expand Up @@ -526,7 +511,6 @@ context('Side Window > Manual Prior Notification Form > Form', () => {
cy.fill('Poids (POH)', 50)

cy.fill('Engins utilisés', ['OTP'], { index: 1 })
cy.fill('Saisi par', 'BOB')

cy.clickButton('Créer le préavis')

Expand Down Expand Up @@ -660,8 +644,10 @@ context('Side Window > Manual Prior Notification Form > Form', () => {
'/bff/v1/prior_notifications/00000000-0000-4000-0000-000000000010/verify_and_send?isManuallyCreated=true&operationDate=*'
).as('verifyAndSendPriorNotification')
editSideWindowPriorNotification('BEAU SÉANT', '00000000-0000-4000-0000-000000000010')

cy.get('button').contains('Diffusé')
cy.fill('Saisi par', 'BOB')

cy.fill("Points d'attention identifiés par le CNSP", "Un point d'attention mis à jour.")

// When
cy.clickButton('Enregistrer')
Expand Down Expand Up @@ -700,7 +686,6 @@ context('Side Window > Manual Prior Notification Form > Form', () => {

cy.fill('Engins utilisés', ['OTB'], { index: 1 })
cy.fill('Zone globale de capture', '27.7.d')
cy.fill('Saisi par', 'BOB')

cy.clickButton('Créer le préavis')

Expand Down

0 comments on commit 6f3c605

Please sign in to comment.