Skip to content

Commit 806d345

Browse files
committed
remove deleteNotebook func and step for afterEach
1 parent 517b8d0 commit 806d345

File tree

10 files changed

+93
-218
lines changed

10 files changed

+93
-218
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import {
1717
performLoginIfRequired,
1818
waitForZeppelinReady,
1919
PAGES,
20-
createTestNotebook,
21-
deleteTestNotebook
20+
createTestNotebook
2221
} from '../../../utils';
2322

2423
test.describe('Notebook Action Bar Functionality', () => {
@@ -38,12 +37,6 @@ test.describe('Notebook Action Bar Functionality', () => {
3837
await page.waitForLoadState('networkidle');
3938
});
4039

41-
test.afterEach(async ({ page }) => {
42-
if (testNotebook?.noteId) {
43-
await deleteTestNotebook(page, testNotebook.noteId);
44-
}
45-
});
46-
4740
test('should display and allow title editing with tooltip', async ({ page }) => {
4841
// Then: Title editor should be functional with proper tooltip
4942
const actionBarUtil = new NotebookActionBarUtil(page);

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import {
1919
waitForNotebookLinks,
2020
waitForZeppelinReady,
2121
PAGES,
22-
createTestNotebook,
23-
deleteTestNotebook
22+
createTestNotebook
2423
} from '../../../utils';
2524

2625
/**
@@ -60,10 +59,6 @@ test.describe.serial('Comprehensive Keyboard Shortcuts (ShortcutsMap)', () => {
6059
test.afterEach(async ({ page }) => {
6160
// Clean up any open dialogs or modals
6261
await page.keyboard.press('Escape');
63-
64-
if (testNotebook?.noteId) {
65-
await deleteTestNotebook(page, testNotebook.noteId);
66-
}
6762
});
6863

6964
// ===== CORE EXECUTION SHORTCUTS =====

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import {
1717
performLoginIfRequired,
1818
waitForZeppelinReady,
1919
PAGES,
20-
createTestNotebook,
21-
deleteTestNotebook
20+
createTestNotebook
2221
} from '../../../utils';
2322

2423
test.describe('Notebook Container Component', () => {
@@ -38,12 +37,6 @@ test.describe('Notebook Container Component', () => {
3837
await page.waitForLoadState('networkidle');
3938
});
4039

41-
test.afterEach(async ({ page }) => {
42-
if (testNotebook?.noteId) {
43-
await deleteTestNotebook(page, testNotebook.noteId);
44-
}
45-
});
46-
4740
test('should display notebook container with proper structure', async ({ page }) => {
4841
// Then: Notebook container should be properly structured
4942
const notebookUtil = new NotebookPageUtil(page);

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import {
1818
performLoginIfRequired,
1919
waitForZeppelinReady,
2020
PAGES,
21-
createTestNotebook,
22-
deleteTestNotebook
21+
createTestNotebook
2322
} from '../../../utils';
2423

2524
test.describe('Notebook Paragraph Functionality', () => {
@@ -40,12 +39,6 @@ test.describe('Notebook Paragraph Functionality', () => {
4039
await page.waitForLoadState('networkidle');
4140
});
4241

43-
test.afterEach(async ({ page }) => {
44-
if (testNotebook?.noteId) {
45-
await deleteTestNotebook(page, testNotebook.noteId);
46-
}
47-
});
48-
4942
test('should display paragraph container with proper structure', async ({ page }) => {
5043
// Then: Paragraph container should be visible with proper structure
5144
const paragraphUtil = new NotebookParagraphUtil(page);

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import {
1919
waitForNotebookLinks,
2020
waitForZeppelinReady,
2121
PAGES,
22-
createTestNotebook,
23-
deleteTestNotebook
22+
createTestNotebook
2423
} from '../../../utils';
2524

2625
test.describe('Published Paragraph', () => {
@@ -47,12 +46,6 @@ test.describe('Published Paragraph', () => {
4746
testNotebook = await createTestNotebook(page);
4847
});
4948

50-
test.afterEach(async ({ page }) => {
51-
if (testNotebook?.noteId) {
52-
await deleteTestNotebook(page, testNotebook?.noteId);
53-
}
54-
});
55-
5649
test.describe('Error Handling', () => {
5750
test('should show error modal when notebook does not exist', async ({ page }) => {
5851
const nonExistentIds = testUtil.generateNonExistentIds();

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import {
1717
performLoginIfRequired,
1818
waitForZeppelinReady,
1919
PAGES,
20-
createTestNotebook,
21-
deleteTestNotebook
20+
createTestNotebook
2221
} from '../../../utils';
2322

2423
test.describe('Notebook Sidebar Functionality', () => {
@@ -43,12 +42,6 @@ test.describe('Notebook Sidebar Functionality', () => {
4342
await page.waitForLoadState('networkidle');
4443
});
4544

46-
test.afterEach(async ({ page }) => {
47-
if (testNotebook?.noteId) {
48-
await deleteTestNotebook(page, testNotebook.noteId);
49-
}
50-
});
51-
5245
test('should display navigation buttons', async () => {
5346
// Then: Navigation buttons should be visible
5447
await testUtil.verifyNavigationButtons();

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

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ import {
1818
PAGES,
1919
performLoginIfRequired,
2020
waitForZeppelinReady,
21-
createTestNotebook,
22-
deleteTestNotebook
21+
createTestNotebook
2322
} from '../../../utils';
2423

2524
test.describe.serial('Folder Rename', () => {
2625
let folderRenamePage: FolderRenamePage;
2726
let folderRenameUtil: FolderRenamePageUtil;
28-
let testNotebook: { noteId: string; paragraphId: string };
2927
let testFolderName: string;
3028

3129
addPageAnnotationBeforeEach(PAGES.SHARE.FOLDER_RENAME);
@@ -40,16 +38,7 @@ test.describe.serial('Folder Rename', () => {
4038

4139
// Create a test notebook with folder structure
4240
testFolderName = `TestFolder_${Date.now()}`;
43-
testNotebook = await createTestNotebook(page, testFolderName);
44-
// testFolderName is now the folder that contains the notebook
45-
});
46-
47-
test.afterEach(async ({ page }) => {
48-
// Clean up the test notebook and folder
49-
if (testNotebook?.noteId) {
50-
await deleteTestNotebook(page, testNotebook.noteId);
51-
await deleteTestNotebook(page, testFolderName);
52-
}
41+
await createTestNotebook(page, testFolderName);
5342
});
5443

5544
test('Given folder exists in notebook list, When hovering over folder, Then context menu should appear', async () => {

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import {
1818
PAGES,
1919
performLoginIfRequired,
2020
waitForZeppelinReady,
21-
createTestNotebook,
22-
deleteTestNotebook
21+
createTestNotebook
2322
} from '../../../utils';
2423

2524
test.describe('Note Rename', () => {
@@ -45,13 +44,6 @@ test.describe('Note Rename', () => {
4544
await page.waitForLoadState('networkidle');
4645
});
4746

48-
test.afterEach(async ({ page }) => {
49-
// Clean up the test notebook after each test
50-
if (testNotebook?.noteId) {
51-
await deleteTestNotebook(page, testNotebook.noteId);
52-
}
53-
});
54-
5547
test('Given notebook page is loaded, When checking note title, Then title should be displayed', async () => {
5648
await noteRenameUtil.verifyTitleIsDisplayed();
5749
});

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import {
1818
PAGES,
1919
performLoginIfRequired,
2020
waitForZeppelinReady,
21-
createTestNotebook,
22-
deleteTestNotebook
21+
createTestNotebook
2322
} from '../../../utils';
2423

2524
test.describe('Note Table of Contents', () => {
@@ -53,12 +52,6 @@ test.describe('Note Table of Contents', () => {
5352
await expect(noteTocPage.tocToggleButton).toBeVisible({ timeout: 10000 });
5453
});
5554

56-
test.afterEach(async ({ page }) => {
57-
if (testNotebook?.noteId) {
58-
await deleteTestNotebook(page, testNotebook.noteId);
59-
}
60-
});
61-
6255
test('Given notebook page is loaded, When clicking TOC toggle button, Then TOC panel should open', async () => {
6356
await noteTocUtil.verifyTocPanelOpens();
6457
});

0 commit comments

Comments
 (0)