Skip to content

Commit

Permalink
Uncouple e2e tests from monitor-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Aug 8, 2024
1 parent 63ed06d commit 50c2c19
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ALL_SEAFRONT_GROUP } from '@constants/seafront'
import { customDayjs } from '@mtes-mct/monitor-ui'

import { addSideWindowPriorNotification, editSideWindowPriorNotification } from './utils'
import { customDayjs } from '../../utils/customDayjs'
import { getUtcDateInMultipleFormats } from '../../utils/getUtcDateInMultipleFormats'

context('Side Window > Manual Prior Notification Form > Behavior', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PriorNotification } from '@features/PriorNotification/PriorNotification.types'
import { customDayjs } from '@mtes-mct/monitor-ui'
import { omit } from 'lodash'

import { addSideWindowPriorNotification, editSideWindowPriorNotification } from './utils'
import { customDayjs } from '../../utils/customDayjs'
import { getUtcDateInMultipleFormats } from '../../utils/getUtcDateInMultipleFormats'
import { isDateCloseTo } from '../../utils/isDateCloseTo'
import { openSideWindowPriorNotificationList } from '../prior_notification_list/utils'
Expand Down
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/utils/getUtcizedDayjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { Dayjs } from 'dayjs'
* ```
*/
export function getUtcizedDayjs(localDate?: Date): Dayjs {
const definedLocalDate = localDate || new Date()
const definedLocalDate = localDate ?? new Date()

// The number of minutes returned by getTimezoneOffset() is positive if the local time zone is behind UTC,
// and negative if the local time zone is ahead of UTC. For example, for UTC+10, `-600` will be returned.
Expand Down

0 comments on commit 50c2c19

Please sign in to comment.