Skip to content

Commit

Permalink
Fix e2e tests replacing non-acknowledged & right reportId
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Aug 15, 2024
1 parent 007dd3b commit 29f856a
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,17 @@ context('Side Window > Prior Notification Card > Card', () => {
})

it('Should update a logbook prior notification', () => {
cy.request('PUT', `/bff/v1/prior_notifications/logbook/FAKE_OPERATION_108?operationDate=${dayjs().toISOString()}`, {
cy.request('PUT', `/bff/v1/prior_notifications/logbook/FAKE_OPERATION_114?operationDate=${dayjs().toISOString()}`, {
body: {
authorTrigram: null,
note: null
}
})

// Given
openSideWindowPriorNotification(`CALAMARO`)
openSideWindowPriorNotification(`MER À BOIRE`)

cy.intercept('PUT', `/bff/v1/prior_notifications/logbook/FAKE_OPERATION_108?operationDate=*`).as(
cy.intercept('PUT', `/bff/v1/prior_notifications/logbook/FAKE_OPERATION_114?operationDate=*`).as(
'updateLogbookPriorNotification'
)

Expand All @@ -160,13 +160,13 @@ context('Side Window > Prior Notification Card > Card', () => {
cy.get('.Element-Button').contains('Télécharger').parent().should('be.disabled')

// The note is saved
openSideWindowPriorNotification(`CALAMARO`)
openSideWindowPriorNotification(`MER À BOIRE`)

cy.get('[name="note"]').should('have.value', "Un point d'attention.")
cy.get('[name="authorTrigram"]').should('have.value', 'ABC')

// Reset
cy.request('PUT', `/bff/v1/prior_notifications/logbook/FAKE_OPERATION_108?operationDate=${dayjs().toISOString()}`, {
cy.request('PUT', `/bff/v1/prior_notifications/logbook/FAKE_OPERATION_114?operationDate=${dayjs().toISOString()}`, {
body: {
authorTrigram: null,
note: null
Expand All @@ -179,7 +179,7 @@ context('Side Window > Prior Notification Card > Card', () => {

cy.intercept(
'POST',
`/bff/v1/prior_notifications/FAKE_OPERATION_111/verify_and_send?isManuallyCreated=false&operationDate=*`
`/bff/v1/prior_notifications/FAKE_OPERATION_111_COR_ORPHAN/verify_and_send?isManuallyCreated=false&operationDate=*`
).as('verifyAndSendPriorNotification')

cy.clickButton('Diffuser')
Expand All @@ -203,7 +203,7 @@ context('Side Window > Prior Notification Card > Card', () => {
cy.clickButton('Fermer')
cy.fill('Rechercher un navire', 'LE POISSON AMBULANT')

cy.getTableRowById('FAKE_OPERATION_111' as unknown as number)
cy.getTableRowById('FAKE_OPERATION_111_COR_ORPHAN' as unknown as number)
.find('span[title="Diffusion en cours"]')
.should('be.visible')
})
Expand Down

0 comments on commit 29f856a

Please sign in to comment.