diff --git a/__test__/e2e/theming.spec.ts b/__test__/e2e/theming.spec.ts index 151a1f4f..5d9145a2 100644 --- a/__test__/e2e/theming.spec.ts +++ b/__test__/e2e/theming.spec.ts @@ -12,9 +12,7 @@ test.describe('theming', () => { }) => { const mainPage = page.locator('[role="main"]') await expect(mainPage).toBeVisible() - await page.evaluate( - () => document.querySelector('[role="main"]')?.scrollTo(0, 100), - ) + await page.evaluate(() => window.scrollTo(0, 100)) expect(await page.isChecked(themeToggleSelector)).toEqual(false) await page.check(themeToggleSelector)