Skip to content

Commit f0afd38

Browse files
authored
Piste VMS - Enlever le LAN de la date range pour afficher la piste (#4169)
## Linked issues - Resolve #4155 ---- - [ ] Tests E2E (Cypress)
2 parents fedd86e + 41573f7 commit f0afd38

File tree

14 files changed

+124
-54
lines changed

14 files changed

+124
-54
lines changed

backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/logbook/VoyageDatesAndTripNumber.kt

+1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ data class VoyageDatesAndTripNumber(
66
val tripNumber: String,
77
val startDate: ZonedDateTime,
88
val endDate: ZonedDateTime,
9+
val endDateWithoutLAN: ZonedDateTime? = null,
910
val totalTripsFoundForDates: Number? = null,
1011
)

backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/use_cases/vessel/GetVesselVoyage.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class GetVesselVoyage(
108108
isLastVoyage = isLastVoyage,
109109
isFirstVoyage = isFirstVoyage,
110110
startDate = trip.startDate,
111-
endDate = trip.endDate,
111+
endDate = trip.endDateWithoutLAN,
112112
tripNumber = trip.tripNumber,
113113
logbookMessagesAndAlerts = LogbookMessagesAndAlerts(logbookMessages, alerts),
114114
)

backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/use_cases/vessel/GetVesselVoyageByDates.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class GetVesselVoyageByDates(
8080
isLastVoyage = isLastVoyage,
8181
isFirstVoyage = isFirstVoyage,
8282
startDate = trip.startDate,
83-
endDate = trip.endDate,
83+
endDate = trip.endDateWithoutLAN,
8484
tripNumber = trip.tripNumber,
8585
totalTripsFoundForDates = trip.totalTripsFoundForDates,
8686
logbookMessagesAndAlerts = LogbookMessagesAndAlerts(logbookMessages, alerts),

backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/infrastructure/database/repositories/JpaLogbookReportRepository.kt

+5
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ class JpaLogbookReportRepository(
151151
tripNumber = firstTrip.tripNumber,
152152
startDate = firstTrip.startDate.atZone(UTC),
153153
endDate = firstTrip.endDate.atZone(UTC),
154+
endDateWithoutLAN = firstTrip.endDateWithoutLAN?.atZone(UTC),
154155
totalTripsFoundForDates = trips.size,
155156
)
156157
}
@@ -181,6 +182,7 @@ class JpaLogbookReportRepository(
181182
tripNumber = lastTrip.tripNumber,
182183
startDate = lastTrip.startDate.atZone(UTC),
183184
endDate = lastTrip.endDate.atZone(UTC),
185+
endDateWithoutLAN = lastTrip.endDateWithoutLAN?.atZone(UTC),
184186
)
185187
}
186188

@@ -217,6 +219,7 @@ class JpaLogbookReportRepository(
217219
tripNumber = previousTripNumber,
218220
startDate = previousTrip.startDate.atZone(UTC),
219221
endDate = previousTrip.endDate.atZone(UTC),
222+
endDateWithoutLAN = previousTrip.endDateWithoutLAN?.atZone(UTC),
220223
)
221224
}
222225

@@ -247,6 +250,7 @@ class JpaLogbookReportRepository(
247250
tripNumber = tripNumber,
248251
startDate = nextTrip.startDate.atZone(UTC),
249252
endDate = nextTrip.endDate.atZone(UTC),
253+
endDateWithoutLAN = nextTrip.endDateWithoutLAN?.atZone(UTC),
250254
)
251255
}
252256

@@ -285,6 +289,7 @@ class JpaLogbookReportRepository(
285289
tripNumber = nextTripNumber,
286290
startDate = nextTrip.startDate.atZone(UTC),
287291
endDate = nextTrip.endDate.atZone(UTC),
292+
endDateWithoutLAN = nextTrip.endDateWithoutLAN?.atZone(UTC),
288293
)
289294
}
290295

backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/infrastructure/database/repositories/interfaces/DBLogbookReportRepository.kt

+45-5
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,10 @@ interface DBLogbookReportRepository :
268268
): List<LogbookReportEntity>
269269

270270
@Query(
271-
"""SELECT new fr.gouv.cnsp.monitorfish.infrastructure.database.repositories.interfaces.VoyageTripNumberAndDate(e.tripNumber, MIN(e.operationDateTime))
271+
"""SELECT new fr.gouv.cnsp.monitorfish.infrastructure.database.repositories.interfaces.VoyageTripNumberAndDate(
272+
e.tripNumber,
273+
MIN(e.operationDateTime)
274+
)
272275
FROM LogbookReportEntity e
273276
WHERE e.internalReferenceNumber = :internalReferenceNumber
274277
AND e.tripNumber IS NOT NULL
@@ -292,11 +295,22 @@ interface DBLogbookReportRepository :
292295
pageable: Pageable,
293296
): List<VoyageTripNumberAndDate>
294297

298+
/**
299+
* We filter the LAN to ensure we do not miss a trip if there is a trip is ended before the LAN of the previous trip is sent.
300+
* i.e, we want the "Trip 2" not to be missed:
301+
*
302+
* [DEP, FAR, RTP, ...LAN] Trip 1 (current trip)
303+
* [DEP, FAR, RTP] Trip 2
304+
* [DEP, FAR, RTP, ...LAN] Trip 3
305+
*
306+
* time ->
307+
*/
295308
@Query(
296309
"""SELECT new fr.gouv.cnsp.monitorfish.infrastructure.database.repositories.interfaces.VoyageTripNumberAndDate(e.tripNumber, MAX(e.operationDateTime))
297310
FROM LogbookReportEntity e
298311
WHERE e.internalReferenceNumber = :internalReferenceNumber
299312
AND e.tripNumber IS NOT NULL
313+
AND e.tripNumber != :tripNumber
300314
AND e.operationType IN ('DAT', 'COR')
301315
AND NOT e.isTestMessage
302316
AND e.operationDateTime > (
@@ -306,7 +320,8 @@ interface DBLogbookReportRepository :
306320
LogbookReportEntity er
307321
WHERE
308322
er.internalReferenceNumber = :internalReferenceNumber AND
309-
er.tripNumber = :tripNumber
323+
er.tripNumber = :tripNumber AND
324+
er.messageType != 'LAN'
310325
)
311326
GROUP BY e.tripNumber
312327
ORDER BY 2 ASC""",
@@ -318,7 +333,11 @@ interface DBLogbookReportRepository :
318333
): List<VoyageTripNumberAndDate>
319334

320335
@Query(
321-
"""SELECT new fr.gouv.cnsp.monitorfish.infrastructure.database.repositories.interfaces.VoyageDates(MIN(e.operationDateTime), MAX(e.operationDateTime))
336+
"""SELECT new fr.gouv.cnsp.monitorfish.infrastructure.database.repositories.interfaces.VoyageDates(
337+
MIN(e.operationDateTime),
338+
MAX(e.operationDateTime),
339+
MAX(CASE WHEN messageType != 'LAN' THEN e.operationDateTime END)
340+
)
322341
FROM LogbookReportEntity e
323342
WHERE e.internalReferenceNumber = :internalReferenceNumber
324343
AND e.tripNumber = :tripNumber
@@ -329,23 +348,37 @@ interface DBLogbookReportRepository :
329348
tripNumber: String,
330349
): VoyageDates
331350

351+
/**
352+
* The last `MAX(lr_all.operationDateTime)` date is used to display the fishing trip positions, hence LAN are excluded.
353+
*/
332354
@Query(
333-
"""SELECT new fr.gouv.cnsp.monitorfish.infrastructure.database.repositories.interfaces.VoyageTripNumberAndDates(e.tripNumber, MIN(e.operationDateTime), MAX(e.operationDateTime))
355+
"""SELECT new fr.gouv.cnsp.monitorfish.infrastructure.database.repositories.interfaces.VoyageTripNumberAndDates(
356+
e.tripNumber,
357+
MIN(e.operationDateTime),
358+
MAX(e.operationDateTime),
359+
MAX(CASE WHEN messageType != 'LAN' THEN e.operationDateTime END)
360+
)
334361
FROM LogbookReportEntity e
335362
WHERE e.internalReferenceNumber = :internalReferenceNumber
336363
AND e.tripNumber IS NOT NULL
337364
AND e.operationType IN ('DAT', 'COR')
338365
AND e.operationDateTime <= :beforeDateTime
339366
AND NOT e.isTestMessage
340367
GROUP BY e.tripNumber
341-
ORDER BY 2 DESC """,
368+
ORDER BY 2 DESC""",
342369
)
343370
fun findTripsBeforeDatetime(
344371
internalReferenceNumber: String,
345372
beforeDateTime: Instant,
346373
pageable: Pageable,
347374
): List<VoyageTripNumberAndDates>
348375

376+
/**
377+
* Subqueries are required to get MIN and MAX date_time outside the clause :
378+
* `e.operationDateTime BETWEEN :afterDateTime AND :beforeDateTime`
379+
*
380+
* The last `MAX(lr_all.activityDateTime)` date is used to display the fishing trip positions, hence LAN are excluded.
381+
*/
349382
@Query(
350383
"""
351384
SELECT new fr.gouv.cnsp.monitorfish.infrastructure.database.repositories.interfaces.VoyageTripNumberAndDates(
@@ -361,6 +394,13 @@ interface DBLogbookReportRepository :
361394
WHERE
362395
lr_all.internalReferenceNumber = :internalReferenceNumber AND
363396
lr_all.tripNumber = e.tripNumber
397+
),
398+
(SELECT MAX(lr_all.operationDateTime)
399+
FROM LogbookReportEntity lr_all
400+
WHERE
401+
lr_all.internalReferenceNumber = :internalReferenceNumber AND
402+
lr_all.tripNumber = e.tripNumber AND
403+
lr_all.messageType != 'LAN'
364404
)
365405
)
366406
FROM LogbookReportEntity e

backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/infrastructure/database/repositories/interfaces/VoyageTripNumberAndDates.kt

+2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ class VoyageTripNumberAndDates(
1111
var tripNumber: String,
1212
var startDate: Instant,
1313
var endDate: Instant,
14+
var endDateWithoutLAN: Instant? = null,
1415
)
1516

1617
class VoyageDates(
1718
var startDate: Instant,
1819
var endDate: Instant,
20+
var endDateWithoutLAN: Instant? = null,
1921
)

backend/src/main/resources/db/testdata/V666.5.0__Insert_logbook_raw_messages_and_reports.sql

+4-4
Original file line numberDiff line numberDiff line change
@@ -679,8 +679,8 @@ INSERT INTO logbook_reports (operation_number, trip_number, operation_country,
679679
value, integration_datetime_utc, transmission_format, software)
680680
VALUES ('OOF20190439686456', 20230086, 'OOF', CURRENT_DATE - INTERVAL '5 days', 'DAT',
681681
'OOF20190439686456', null, CURRENT_DATE - INTERVAL '5 days',
682-
'FR263454484', 'FE4864', '8FR6541', 'NO NAME', 'FRA', null, 'LAN',
683-
'{"port": "AEJAZ", "catchLanded": [{"weight": 40.0, "nbFish": null, "species": "SCR", "faoZone": "27.8.a", "freshness": null, "packaging": "CNT", "effortZone": "C", "presentation": "WHL", "economicZone": "FRA", "preservationState": "ALI", "statisticalRectangle": "23E6"}, {"weight": 2.0, "nbFish": null, "species": "LBE", "faoZone": "27.8.a", "freshness": null, "packaging": "CNT", "effortZone": "C", "presentation": "WHL", "economicZone": "FRA", "preservationState": "ALI", "statisticalRectangle": "23E6"}], "landingDatetimeUtc": "2018-09-03T12:18Z"}',
682+
'FR263454484', 'FE4864', '8FR6541', 'NO NAME', 'FRA', null, 'FAR',
683+
'{"hauls": [{"catches": [{"nbFish": null, "weight": 0.0, "faoZone": "27.8.e.1", "species": "MZZ", "effortZone": null, "economicZone": null, "statisticalRectangle": null}], "farDatetimeUtc": "2020-05-06T11:40:22.885Z"}]}',
684684
CURRENT_DATE - INTERVAL '5 days', 'ERS', 'TurboCatch (3.7-1)'),
685685
('OOF20190158541231', 20230087, 'OOF', CURRENT_DATE - INTERVAL '4 days', 'DAT', 'OOF20190158541231', null,
686686
CURRENT_DATE - INTERVAL '4 days',
@@ -689,8 +689,8 @@ VALUES ('OOF20190439686456', 20230086, 'OOF', CURRENT_DATE - INTERVAL '5 days',
689689
CURRENT_DATE - INTERVAL '4 days', 'ERS', 'TurboCatch (3.7-1)'),
690690
('OOF20190439686457', 20230087, 'OOF', CURRENT_DATE - INTERVAL '3 days', 'DAT', 'OOF20190439686457', null,
691691
CURRENT_DATE - INTERVAL '3 days',
692-
'FR263454484', 'FE4864', '8FR6541', 'NO NAME', 'FRA', null, 'PNO',
693-
'{"port": "AEJAZ", "purpose": "LAN", "catchOnboard": [{"weight": 25.0, "nbFish": null, "species": "SOL", "faoZone": "27.8.a", "effortZone": "C", "economicZone": "FRA", "statisticalRectangle": "23E6"}], "tripStartDate": "2018-02-20T00:00Z", "predictedArrivalDatetimeUtc": "2018-02-20T13:38Z"}',
692+
'FR263454484', 'FE4864', '8FR6541', 'NO NAME', 'FRA', null, 'FAR',
693+
'{"hauls": [{"catches": [{"nbFish": null, "weight": 0.0, "faoZone": "27.8.e.1", "species": "MZZ", "effortZone": null, "economicZone": null, "statisticalRectangle": null}], "farDatetimeUtc": "2020-05-06T11:40:22.885Z"}]}',
694694
CURRENT_DATE - INTERVAL '3 days', 'ERS', 'TurboCatch (3.7-1)'),
695695
('d5c3b039-aaee-4cca-bcae-637f5fe574f5', 'SRC-TRP-TTT20200506194051795', null, CURRENT_DATE - INTERVAL '2 days', 'DAT',
696696
'd5c3b039-aaee-4cca-bcae-637f5fe574f5', null, CURRENT_DATE - INTERVAL '2 days', 'FR263454484', 'FE4864', '8FR6541', 'NO NAME', 'FRA', null,

backend/src/test/kotlin/fr/gouv/cnsp/monitorfish/domain/use_cases/vessel/GetVesselVoyageByDatesUTests.kt

+13-3
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,24 @@ class GetVesselVoyageByDatesUTests {
3939
fun `execute Should return a voyage`() {
4040
// Given
4141
val expectedEndDate = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00")
42+
val expectedEndDateWithoutLan = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00").minusDays(1)
4243
val expectedStartDate = ZonedDateTime.parse("2021-05-21T10:24:46.021615+02:00")
4344
val expectedCfr = "FR224226850"
4445
val expectedTripNumber = "123456788"
4546
given(logbookReportRepository.findTripBetweenDates(eq(expectedCfr), any(), any())).willReturn(
46-
VoyageDatesAndTripNumber(expectedTripNumber, expectedStartDate, expectedEndDate),
47+
VoyageDatesAndTripNumber(
48+
tripNumber = expectedTripNumber,
49+
startDate = expectedStartDate,
50+
endDate = expectedEndDate,
51+
endDateWithoutLAN = expectedEndDateWithoutLan,
52+
),
4753
)
4854
given(logbookReportRepository.findTripBeforeTripNumber(eq(expectedCfr), eq(expectedTripNumber))).willReturn(
49-
VoyageDatesAndTripNumber("123456787", expectedStartDate, expectedEndDate),
55+
VoyageDatesAndTripNumber(
56+
tripNumber = "123456787",
57+
startDate = expectedStartDate,
58+
endDate = expectedEndDate,
59+
),
5060
)
5161
given(logbookReportRepository.findTripAfterTripNumber(eq(expectedCfr), eq(expectedTripNumber))).willThrow(
5262
NoLogbookFishingTripFound("Not found"),
@@ -75,7 +85,7 @@ class GetVesselVoyageByDatesUTests {
7585
assertThat(voyage.isLastVoyage).isTrue
7686
assertThat(voyage.isFirstVoyage).isFalse
7787
assertThat(voyage.startDate).isEqualTo(expectedStartDate)
78-
assertThat(voyage.endDate).isEqualTo(expectedEndDate)
88+
assertThat(voyage.endDate).isEqualTo(expectedEndDateWithoutLan)
7989
assertThat(logbookMessages).hasSize(1)
8090
assertThat(alerts).hasSize(0)
8191
}

backend/src/test/kotlin/fr/gouv/cnsp/monitorfish/domain/use_cases/vessel/GetVesselVoyageUTests.kt

+32-8
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,18 @@ class GetVesselVoyageUTests {
3232
fun `execute Should return a voyage with isFirstVoyage as true When requesting a LAST voyage with current trip number as null`() {
3333
// Given
3434
val endDate = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00")
35+
val endDateWithoutLAN = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00").minusDays(1)
3536
val startDate = ZonedDateTime.parse("2021-05-21T10:24:46.021615+02:00")
3637
given(logbookReportRepository.findTripBeforeTripNumber(any(), any())).willThrow(
3738
NoLogbookFishingTripFound("Not found"),
3839
)
3940
given(logbookReportRepository.findLastTripBeforeDateTime(any(), any())).willReturn(
40-
VoyageDatesAndTripNumber("1234", startDate, endDate),
41+
VoyageDatesAndTripNumber(
42+
tripNumber = "1234",
43+
startDate = startDate,
44+
endDate = endDate,
45+
endDateWithoutLAN = endDateWithoutLAN,
46+
),
4147
)
4248

4349
// When
@@ -54,7 +60,7 @@ class GetVesselVoyageUTests {
5460
assertThat(voyage.isFirstVoyage).isTrue
5561
assertThat(voyage.startDate).isEqualTo(startDate)
5662
assertThat(voyage.tripNumber).isEqualTo("1234")
57-
assertThat(voyage.endDate).isEqualTo(endDate)
63+
assertThat(voyage.endDate).isEqualTo(endDateWithoutLAN)
5864
assertThat(alerts).hasSize(0)
5965
}
6066

@@ -78,10 +84,16 @@ class GetVesselVoyageUTests {
7884
fun `execute Should return a voyage with isLastVoyage as false When requesting a LAST voyage`() {
7985
// Given
8086
val endDate = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00")
87+
val endDateWithoutLAN = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00").minusDays(1)
8188
val startDate = ZonedDateTime.parse("2021-05-21T10:24:46.021615+02:00")
8289
val tripNumber = "123456789"
8390
given(logbookReportRepository.findLastTripBeforeDateTime(any(), any())).willReturn(
84-
VoyageDatesAndTripNumber(tripNumber, startDate, endDate),
91+
VoyageDatesAndTripNumber(
92+
tripNumber = tripNumber,
93+
startDate = startDate,
94+
endDate = endDate,
95+
endDateWithoutLAN = endDateWithoutLAN,
96+
),
8597
)
8698

8799
// When
@@ -98,18 +110,24 @@ class GetVesselVoyageUTests {
98110
assertThat(voyage.isLastVoyage).isFalse
99111
assertThat(voyage.isFirstVoyage).isFalse
100112
assertThat(voyage.startDate).isEqualTo(startDate)
101-
assertThat(voyage.endDate).isEqualTo(endDate)
113+
assertThat(voyage.endDate).isEqualTo(endDateWithoutLAN)
102114
assertThat(alerts).hasSize(0)
103115
}
104116

105117
@Test
106118
fun `execute Should return a voyage with isLastVoyage as true When no next voyage after the found voyage is found`() {
107119
// Given
108120
val expectedEndDate = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00")
121+
val expectedEndDateWithoutLAN = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00").minusDays(1)
109122
val expectedStartDate = ZonedDateTime.parse("2021-05-21T10:24:46.021615+02:00")
110123
val expectedTripNumber = "123456789"
111124
given(logbookReportRepository.findTripAfterTripNumber("FR224226850", "123456788")).willReturn(
112-
VoyageDatesAndTripNumber(expectedTripNumber, expectedStartDate, expectedEndDate),
125+
VoyageDatesAndTripNumber(
126+
tripNumber = expectedTripNumber,
127+
startDate = expectedStartDate,
128+
endDate = expectedEndDate,
129+
endDateWithoutLAN = expectedEndDateWithoutLAN,
130+
),
113131
)
114132
given(logbookReportRepository.findTripAfterTripNumber("FR224226850", expectedTripNumber)).willThrow(
115133
NoLogbookFishingTripFound("Not found"),
@@ -126,17 +144,23 @@ class GetVesselVoyageUTests {
126144
assertThat(voyage.isLastVoyage).isTrue
127145
assertThat(voyage.isFirstVoyage).isFalse
128146
assertThat(voyage.startDate).isEqualTo(expectedStartDate)
129-
assertThat(voyage.endDate).isEqualTo(expectedEndDate)
147+
assertThat(voyage.endDate).isEqualTo(expectedEndDateWithoutLAN)
130148
assertThat(alerts).hasSize(0)
131149
}
132150

133151
@Test
134152
fun `execute Should return a voyage When a specific trip is requested`() {
135153
// Given
136154
val expectedEndDate = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00")
155+
val expectedEndDateWithoutLAN = ZonedDateTime.parse("2021-06-21T10:24:46.021615+02:00").minusDays(1)
137156
val expectedStartDate = ZonedDateTime.parse("2021-05-21T10:24:46.021615+02:00")
138157
given(logbookReportRepository.findFirstAndLastOperationsDatesOfTrip("FR224226850", "123456788")).willReturn(
139-
VoyageDatesAndTripNumber("123456788", expectedStartDate, expectedEndDate),
158+
VoyageDatesAndTripNumber(
159+
tripNumber = "123456788",
160+
startDate = expectedStartDate,
161+
endDate = expectedEndDate,
162+
endDateWithoutLAN = expectedEndDateWithoutLAN,
163+
),
140164
)
141165

142166
// When
@@ -150,7 +174,7 @@ class GetVesselVoyageUTests {
150174
assertThat(voyage.isLastVoyage).isFalse
151175
assertThat(voyage.isFirstVoyage).isFalse
152176
assertThat(voyage.startDate).isEqualTo(expectedStartDate)
153-
assertThat(voyage.endDate).isEqualTo(expectedEndDate)
177+
assertThat(voyage.endDate).isEqualTo(expectedEndDateWithoutLAN)
154178
assertThat(alerts).hasSize(0)
155179
}
156180
}

backend/src/test/kotlin/fr/gouv/cnsp/monitorfish/infrastructure/database/repositories/JpaLogbookReportRepositoryITests.kt

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class JpaLogbookReportRepositoryITests : AbstractDBTests() {
8080

8181
// Then
8282
assertThat(lastTrip.startDate.toString()).isEqualTo("2019-10-11T01:06Z")
83+
assertThat(lastTrip.endDate.toString()).isEqualTo("2019-10-22T11:06Z")
8384
assertThat(lastTrip.tripNumber).isEqualTo("9463715")
8485
}
8586

frontend/cypress/e2e/main_window/vessel_sidebar/logbook.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,12 @@ context('Vessel sidebar logbook tab', () => {
258258

259259
cy.get('*[data-cy="LogbookMessage"]').eq(0).contains('Départ')
260260
cy.clickButton('Trier par date antéchronologique')
261-
cy.get('*[data-cy="LogbookMessage"]').eq(0).contains('Préavis')
261+
cy.get('*[data-cy="LogbookMessage"]').eq(0).contains('Déclaration de capture')
262262
cy.clickButton('Trier par date chronologique')
263263
cy.get('*[data-cy="LogbookMessage"]').eq(0).contains('Départ')
264264

265265
cy.fill('Numéro de marée', '20230086')
266266
cy.get('*[data-cy="LogbookMessage"]').should('have.length', 1)
267-
cy.get('*[data-cy="LogbookMessage"]').eq(0).contains('Débarquement')
267+
cy.get('*[data-cy="LogbookMessage"]').eq(0).contains('Déclaration de capture')
268268
})
269269
})

0 commit comments

Comments
 (0)