Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SteRiccio committed Sep 29, 2023
1 parent 7d6d532 commit 979a85c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/e2e/tests/surveyFormPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ export default () =>
verifyAttribute(cluster_time, () => {
// it is possible the default value was set one minute after the startTime was initialized in the test
const startTimePlus1Minute = new Date(startTime)
startTimePlus1Minute.setMinutes(startTimePlus1Minute.getMinutes() + 1)
startTimePlus1Minute.setMinutes(startTime.getMinutes() + 1)
const possibleDateValues = [new Date(startTime), startTimePlus1Minute]
const expectedPossibleValues = possibleDateValues.map((possibleDateValue) => {
possibleDateValue.setMinutes(possibleDateValue.getMinutes() - possibleDateValue.getTimezoneOffset())
possibleDateValue.setMinutes(possibleDateValue.getMinutes() + possibleDateValue.getTimezoneOffset())
return formatTime(possibleDateValue)
})
return `(${expectedPossibleValues.join('|')})`
Expand Down

0 comments on commit 979a85c

Please sign in to comment.