Skip to content

Commit 0c97624

Browse files
committed
fix broken test
1 parent 450cb9c commit 0c97624

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

zeppelin-web-angular/e2e/models/notebook-paragraph-page.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ export class NotebookParagraphPage extends BasePage {
7171
return await this.resultDisplay.isVisible();
7272
}
7373

74-
async isCodeEditorVisible(): Promise<boolean> {
75-
return await this.codeEditor.isVisible();
76-
}
77-
7874
async getFooterText(): Promise<string> {
7975
return (await this.footerInfo.textContent()) || '';
8076
}

zeppelin-web-angular/e2e/models/notebook-paragraph-page.util.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ export class NotebookParagraphUtil {
5959
}
6060

6161
async verifyCodeEditorVisibility(): Promise<void> {
62-
const isVisible = await this.paragraphPage.isCodeEditorVisible();
63-
expect(isVisible).toBe(true);
64-
await expect(this.paragraphPage.codeEditor).toBeVisible();
62+
await expect(this.paragraphPage.codeEditor).toBeVisible({ timeout: 10000 });
6563
}
6664

6765
async verifyResultDisplaySystem(): Promise<void> {

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)