Skip to content

Commit 375098e

Browse files
committed
fix broken test
1 parent 450cb9c commit 375098e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

zeppelin-web-angular/e2e/tests/theme/dark-mode.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ test.describe('Dark Mode Theme Switching', () => {
8181

8282
await test.step('GIVEN: No localStorage, System preference is Light', async () => {
8383
await page.emulateMedia({ colorScheme: 'light' });
84-
await page.goto('/#/');
84+
await page.goto('/');
8585
await waitForZeppelinReady(page);
8686
// When no explicit theme is set, it defaults to 'system' mode
8787
// Even in system mode with light preference, the icon should be robot
@@ -92,23 +92,23 @@ test.describe('Dark Mode Theme Switching', () => {
9292

9393
await test.step('GIVEN: No localStorage, System preference is Dark (initial system state)', async () => {
9494
await themePage.setThemeInLocalStorage('system');
95-
await page.goto('/#/');
95+
await page.goto('/');
9696
await waitForZeppelinReady(page);
9797
await themePage.assertSystemTheme(); // Robot icon for system theme
9898
});
9999

100100
await test.step("GIVEN: localStorage is 'dark', System preference is Light", async () => {
101101
await themePage.setThemeInLocalStorage('dark');
102102
await page.emulateMedia({ colorScheme: 'light' });
103-
await page.goto('/#/');
103+
await page.goto('/');
104104
await waitForZeppelinReady(page);
105105
await themePage.assertDarkTheme(); // localStorage should override system
106106
});
107107

108108
await test.step("GIVEN: localStorage is 'system', THEN: Emulate system preference change to Light", async () => {
109109
await themePage.setThemeInLocalStorage('system');
110110
await page.emulateMedia({ colorScheme: 'light' });
111-
await page.goto('/#/');
111+
await page.goto('/');
112112
await waitForZeppelinReady(page);
113113
await expect(themePage.rootElement).toHaveClass(/light/);
114114
await expect(themePage.rootElement).toHaveAttribute('data-theme', 'light');
@@ -118,7 +118,7 @@ test.describe('Dark Mode Theme Switching', () => {
118118
await test.step("GIVEN: localStorage is 'system', THEN: Emulate system preference change to Dark", async () => {
119119
await themePage.setThemeInLocalStorage('system');
120120
await page.emulateMedia({ colorScheme: 'dark' });
121-
await page.goto('/#/');
121+
await page.goto('/');
122122
await waitForZeppelinReady(page);
123123
await expect(themePage.rootElement).toHaveClass(/dark/);
124124
await expect(themePage.rootElement).toHaveAttribute('data-theme', 'dark');

zeppelin-web-angular/e2e/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ const navigateViaHomePageFallback = async (page: Page, baseNotebookName: string)
374374
};
375375

376376
const extractFirstParagraphId = async (page: Page): Promise<string> => {
377-
await page.locator('zeppelin-notebook-paragraph').first().waitFor({ state: 'visible', timeout: 10000 });
377+
await page.locator('zeppelin-notebook-paragraph').first().waitFor({ state: 'visible', timeout: 20000 });
378378

379379
const paragraphContainer = page.locator('zeppelin-notebook-paragraph').first();
380380
const dropdownTrigger = paragraphContainer.locator('a[nz-dropdown]');

0 commit comments

Comments
 (0)