Skip to content

Commit

Permalink
Update manual prior notification form e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Aug 22, 2024
1 parent 70bf574 commit 050b0d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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'],
Expand Down Expand Up @@ -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)',
Expand All @@ -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'],
Expand Down Expand Up @@ -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
})

Expand Down

0 comments on commit 050b0d1

Please sign in to comment.