diff --git a/test/e2e/tests/surveyFormPreview.js b/test/e2e/tests/surveyFormPreview.js index 75e52f9332..9d36d7e918 100644 --- a/test/e2e/tests/surveyFormPreview.js +++ b/test/e2e/tests/surveyFormPreview.js @@ -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('|')})`