Skip to content

Commit 33214d4

Browse files
jongyoulclaude
andcommitted
fix(e2e): add timeout to all waitForLoadState('networkidle') calls
Unbounded networkidle waits can hang indefinitely in CI when background network activity (WebSocket, polling) never settles. Add explicit 30s timeout to every occurrence to prevent test suite timeouts, especially in auth mode where login triggers extra API calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent df96b41 commit 33214d4

9 files changed

Lines changed: 10 additions & 10 deletions

File tree

zeppelin-web-angular/e2e/tests/notebook/action-bar/action-bar-functionality.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test.describe('Notebook Action Bar Functionality', () => {
3535
actionBarPage = new NotebookActionBarPage(page);
3636

3737
await page.goto(`/#/notebook/${testNotebook.noteId}`);
38-
await page.waitForLoadState('networkidle');
38+
await page.waitForLoadState('networkidle', { timeout: 30000 });
3939
});
4040

4141
test('should display and allow title editing with tooltip', async ({ page }) => {
@@ -117,7 +117,7 @@ test.describe('Notebook Action Bar Functionality', () => {
117117
}
118118

119119
await expect(actionBarPage.clearOutputButton).toBeEnabled();
120-
await page.waitForLoadState('networkidle');
120+
await page.waitForLoadState('networkidle', { timeout: 30000 });
121121

122122
const paragraphResults = page.locator('zeppelin-notebook-paragraph-result');
123123
const resultCount = await paragraphResults.count();

zeppelin-web-angular/e2e/tests/notebook/keyboard/notebook-keyboard-shortcuts.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ test.describe.serial('Comprehensive Keyboard Shortcuts (ShortcutsMap)', () => {
643643

644644
// Then: A new tab should be opened with paragraph link
645645
const newPage = await newPagePromise;
646-
await newPage.waitForLoadState('networkidle');
646+
await newPage.waitForLoadState('networkidle', { timeout: 30000 });
647647

648648
// Verify the new tab URL contains the notebook ID and paragraph reference
649649
const newUrl = newPage.url();

zeppelin-web-angular/e2e/tests/notebook/main/notebook-container.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test.describe('Notebook Container Component', () => {
3535
notebookPage = new NotebookPage(page);
3636

3737
await page.goto(`/#/notebook/${testNotebook.noteId}`);
38-
await page.waitForLoadState('networkidle');
38+
await page.waitForLoadState('networkidle', { timeout: 30000 });
3939
});
4040

4141
test('should display notebook container with proper structure', async () => {

zeppelin-web-angular/e2e/tests/notebook/paragraph/paragraph-functionality.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ test.describe('Notebook Paragraph Functionality', () => {
3737
paragraphPage = new NotebookParagraphPage(page);
3838

3939
await page.goto(`/#/notebook/${testNotebook.noteId}`);
40-
await page.waitForLoadState('networkidle');
40+
await page.waitForLoadState('networkidle', { timeout: 30000 });
4141
});
4242

4343
test('should display paragraph container with proper structure', async () => {

zeppelin-web-angular/e2e/tests/notebook/published/published-paragraph.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ test.describe('Published Paragraph', () => {
9292
const { noteId, paragraphId } = testNotebook;
9393

9494
await page.goto(`/#/notebook/${noteId}`);
95-
await page.waitForLoadState('networkidle');
95+
await page.waitForLoadState('networkidle', { timeout: 30000 });
9696

9797
// JUSTIFIED: createTestNotebook creates a single paragraph; first() is deterministic
9898
const paragraphElement = page.locator('zeppelin-notebook-paragraph').first();

zeppelin-web-angular/e2e/tests/notebook/sidebar/sidebar-functionality.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test.describe('Notebook Sidebar Functionality', () => {
3535
testNotebook = await createTestNotebook(page);
3636

3737
await page.goto(`/#/notebook/${testNotebook.noteId}`);
38-
await page.waitForLoadState('networkidle');
38+
await page.waitForLoadState('networkidle', { timeout: 30000 });
3939
});
4040

4141
test('should display navigation buttons', async ({ page }) => {

zeppelin-web-angular/e2e/tests/share/note-rename/note-rename.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ test.describe('Note Rename', () => {
4141

4242
// Navigate to the test notebook
4343
await page.goto(`/#/notebook/${testNotebook.noteId}`);
44-
await page.waitForLoadState('networkidle');
44+
await page.waitForLoadState('networkidle', { timeout: 30000 });
4545
});
4646

4747
test('Given notebook page is loaded, When checking note title, Then title should be displayed', async () => {

zeppelin-web-angular/e2e/tests/share/note-toc/note-toc.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ test.describe('Note Table of Contents', () => {
4242
await noteTocPage.navigateToNotebook(testNotebook.noteId);
4343

4444
// Wait for notebook to fully load
45-
await page.waitForLoadState('networkidle');
45+
await page.waitForLoadState('networkidle', { timeout: 30000 });
4646

4747
// Verify we're actually in a notebook with more specific checks
4848
await expect(page).toHaveURL(new RegExp(`#/notebook/${testNotebook.noteId}`));

zeppelin-web-angular/e2e/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export const performLoginIfRequired = async (page: Page): Promise<boolean> => {
193193
try {
194194
await page.waitForSelector('zeppelin-login', { state: 'hidden', timeout: 30000 });
195195
await page.waitForSelector('text=Welcome to Zeppelin!', { timeout: 30000 });
196-
await page.waitForLoadState('networkidle');
196+
await page.waitForLoadState('networkidle', { timeout: 30000 });
197197
await page.waitForSelector('zeppelin-node-list', { timeout: 30000 });
198198
await waitForZeppelinReady(page);
199199
return true;

0 commit comments

Comments
 (0)