Skip to content

Commit

Permalink
Fix hours in cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
louptheron committed Feb 12, 2024
1 parent 43b4715 commit a1bd560
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class JpaLogbookReportRepositoryITests : AbstractDBTests() {
* +--------------------------------------+
* 2019-10-15T12:01Z ->
*
* <- 2019-10-11T02:06Z
* <- 2019-10-11T01:06Z
* +------------------------+
* | Trip number 15 |
* +------------------------+
Expand Down
9 changes: 6 additions & 3 deletions frontend/cypress/e2e/vessel_sidebar/fishing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,15 +159,18 @@ context('Vessel sidebar fishing tab', () => {

// Hide fishing activities
cy.get('*[data-cy^="show-all-fishing-activities-on-map"]').click({ timeout: 10000 })
cy.intercept('GET', '/bff/v1/vessels/positions*').as('previousTripPositions')
cy.intercept('GET', '/bff/v1/vessels/positions*').as('nextTripPositions')
cy.get('*[data-cy^="vessel-fishing-next-trip"]').click({ timeout: 10000 })
cy.wait('@previousTripPositions')
/**
* Hours are modified before request, see `getDateRangeMinusFourHoursPlusOneHour()`
*/
cy.wait('@nextTripPositions')
.its('response.url')
.should(
'have.string',
'/bff/v1/vessels/positions?internalReferenceNumber=FAK000999999' +
'&externalReferenceNumber=DONTSINK&IRCS=CALLME&vesselIdentifier=INTERNAL_REFERENCE_NUMBER&trackDepth=CUSTOM' +
'&afterDateTime=2019-10-10T22:06:00.000Z&beforeDateTime=2019-10-22T12:06:00.000Z'
'&afterDateTime=2019-10-10T21:06:00.000Z&beforeDateTime=2019-10-22T12:06:00.000Z'
)
cy.get('*[data-cy^="fishing-activity-name"]').should('not.exist')
cy.get('*[data-cy="custom-dates-showed-text"]').contains('Piste affichée du 10/10/19 au 22/10/19')
Expand Down

0 comments on commit a1bd560

Please sign in to comment.