Skip to content

Commit

Permalink
fix e2e test (#14845)
Browse files Browse the repository at this point in the history
Co-authored-by: CarinaWolli <wollencarina@gmail.com>
  • Loading branch information
CarinaWolli and CarinaWolli committed May 1, 2024
1 parent 8f69811 commit dd78741
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/web/playwright/availability.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ test.describe("Availablity", () => {

test("Date Overrides", async ({ page }) => {
await page.getByTestId("schedules").first().click();
await page.locator('[data-testid="Sunday-switch"]').first().click();
await page.locator('[data-testid="Saturday-switch"]').first().click();

await page.getByTestId("add-override").click();
await page.locator('[id="modal-title"]').waitFor();
await page.getByTestId("incrementMonth").click();
Expand Down
1 change: 1 addition & 0 deletions packages/features/schedules/components/Schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const ScheduleDay = <TFieldValues extends FieldValues>({
disabled={!watchDayRange || disabled}
defaultChecked={watchDayRange && watchDayRange.length > 0}
checked={watchDayRange && !!watchDayRange.length}
data-testid={`${weekday}-switch`}
onCheckedChange={(isChecked) => {
setValue(name, (isChecked ? [DEFAULT_DAY_RANGE] : []) as TFieldValues[typeof name]);
}}
Expand Down

0 comments on commit dd78741

Please sign in to comment.