Skip to content

Commit 0b401b3

Browse files
mariuobrianchandotcom
authored andcommitted
LPD-58325 Change for CI consistency
1 parent f574f9e commit 0b401b3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

modules/test/playwright/tests/calendar-web/main/calendarEvent.spec.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import performLogin, {
2222
import {journalPagesTest} from '../../journal-web/main/fixtures/journalPagesTest';
2323
import getPageDefinition from '../../layout-content-page-editor-web/main/utils/getPageDefinition';
2424
import getWidgetDefinition from '../../layout-content-page-editor-web/main/utils/getWidgetDefinition';
25-
import {getNextOrPreviousSaturday} from './utils/getNextOrPreviousSaturday';
2625
import {toLocalDateTimeFormatted} from './utils/toLocalDateTimeFormatted';
2726

2827
export const test = mergeTests(
@@ -479,14 +478,13 @@ test('event ending at midnight does not render on the next day', async ({
479478
calendarWidgetPage,
480479
page,
481480
}) => {
482-
const today = new Date();
481+
const eventStartDay = new Date();
482+
eventStartDay.setDate(15);
483483

484-
const saturday = getNextOrPreviousSaturday(today);
484+
const eventEndDay = new Date();
485+
eventEndDay.setDate(eventStartDay.getDate() + 1);
485486

486-
const sunday = new Date(saturday);
487-
sunday.setDate(saturday.getDate() + 1);
488-
489-
const [startDate, endDate] = [saturday, sunday].map((date) =>
487+
const [startDate, endDate] = [eventStartDay, eventEndDay].map((date) =>
490488
toLocalDateTimeFormatted(date.toUTCString(), {
491489
day: '2-digit',
492490
month: '2-digit',

0 commit comments

Comments
 (0)