From 37f0ad4023f95e7df82ec5a8fc6f20c4c15542f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Silva?= Date: Mon, 27 Jan 2025 14:07:17 +0000 Subject: [PATCH] EVEREST-970 | change default schedule (#1061) * chore: change default schedule * fix: e2e schedule data-testid * fix: e2e tests --- ui/apps/everest/.e2e/pr/db-cluster-details/schedules.e2e.ts | 4 ++-- .../src/components/time-selection/time-selection.constants.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/apps/everest/.e2e/pr/db-cluster-details/schedules.e2e.ts b/ui/apps/everest/.e2e/pr/db-cluster-details/schedules.e2e.ts index c392da2ac..a53b4f4cb 100644 --- a/ui/apps/everest/.e2e/pr/db-cluster-details/schedules.e2e.ts +++ b/ui/apps/everest/.e2e/pr/db-cluster-details/schedules.e2e.ts @@ -176,7 +176,7 @@ test.describe('Schedules List', async () => { await page.getByTestId('scheduled-backups'); await scheduledBackupsAccordion.click(); - expect(page.getByText('Monthly on day 1 at 12:00 AM')).toBeTruthy(); + expect(page.getByText('Monthly on day 1 at 1:00 AM')).toBeTruthy(); expect(page.getByText('2 active schedules')).toBeTruthy(); }); @@ -245,7 +245,7 @@ test.describe('Schedules List', async () => { await scheduledBackupsAccordion.click(); const scheduleForEditBtn = await page - .getByTestId('schedule-0 0 1 * *') + .getByTestId('schedule-0 1 1 * *') .getByTestId('edit-schedule-button'); await scheduleForEditBtn.click(); diff --git a/ui/apps/everest/src/components/time-selection/time-selection.constants.ts b/ui/apps/everest/src/components/time-selection/time-selection.constants.ts index 9e233b936..13e723557 100644 --- a/ui/apps/everest/src/components/time-selection/time-selection.constants.ts +++ b/ui/apps/everest/src/components/time-selection/time-selection.constants.ts @@ -25,9 +25,9 @@ export const DAYS_MONTH = Array.from({ length: 31 }, (_, i) => i + 1); export const HOURS_AM_PM = Array.from({ length: 12 }, (_, i) => i + 1); export const TIME_SELECTION_DEFAULTS = { - [TimeSelectionFields.selectedTime]: TimeValue.hours, + [TimeSelectionFields.selectedTime]: TimeValue.days, [TimeSelectionFields.minute]: 0, - [TimeSelectionFields.hour]: 12, + [TimeSelectionFields.hour]: 1, [TimeSelectionFields.amPm]: AmPM.AM, [TimeSelectionFields.weekDay]: WeekDays.Mo, [TimeSelectionFields.onDay]: 1,