Skip to content

Commit b81dda2

Browse files
committed
remove unsued function and apply review
1 parent b07b933 commit b81dda2

4 files changed

Lines changed: 5 additions & 92 deletions

File tree

zeppelin-web-angular/e2e/models/home-page.util.ts

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -44,56 +44,18 @@ export class HomePageUtil {
4444
};
4545
}
4646

47-
async verifyHomePageIntegrity(): Promise<void> {
48-
await this.verifyHomePageElements();
49-
await this.verifyNotebookFunctionalities();
50-
await this.verifyTutorialNotebooks();
51-
await this.verifyExternalLinks();
52-
}
53-
5447
async verifyHomePageElements(): Promise<void> {
5548
await expect(this.homePage.welcomeHeading).toBeVisible();
5649
await expect(this.homePage.notebookSection).toBeVisible();
5750
await expect(this.homePage.helpSection).toBeVisible();
5851
await expect(this.homePage.communitySection).toBeVisible();
5952
}
6053

61-
async verifyNotebookFunctionalities(): Promise<void> {
62-
await expect(this.homePage.createNewNoteButton).toBeVisible();
63-
await expect(this.homePage.importNoteButton).toBeVisible();
64-
65-
const filterInputCount = await this.homePage.filterInput.count();
66-
if (filterInputCount > 0) {
67-
await expect(this.homePage.filterInput).toBeVisible();
68-
}
69-
}
70-
71-
async verifyTutorialNotebooks(): Promise<void> {
72-
await expect(this.homePage.tutorialNotebooks.flinkTutorial).toBeVisible();
73-
await expect(this.homePage.tutorialNotebooks.pythonTutorial).toBeVisible();
74-
await expect(this.homePage.tutorialNotebooks.sparkTutorial).toBeVisible();
75-
await expect(this.homePage.tutorialNotebooks.rTutorial).toBeVisible();
76-
await expect(this.homePage.tutorialNotebooks.miscellaneousTutorial).toBeVisible();
77-
}
78-
7954
async verifyExternalLinks(): Promise<void> {
80-
const docCount = await this.homePage.externalLinks.documentation.count();
81-
const mailCount = await this.homePage.externalLinks.mailingList.count();
82-
const issuesCount = await this.homePage.externalLinks.issuesTracking.count();
83-
const githubCount = await this.homePage.externalLinks.github.count();
84-
85-
if (docCount > 0) {
86-
await expect(this.homePage.externalLinks.documentation).toBeVisible();
87-
}
88-
if (mailCount > 0) {
89-
await expect(this.homePage.externalLinks.mailingList).toBeVisible();
90-
}
91-
if (issuesCount > 0) {
92-
await expect(this.homePage.externalLinks.issuesTracking).toBeVisible();
93-
}
94-
if (githubCount > 0) {
95-
await expect(this.homePage.externalLinks.github).toBeVisible();
96-
}
55+
await expect(this.homePage.externalLinks.documentation).toBeVisible();
56+
await expect(this.homePage.externalLinks.mailingList).toBeVisible();
57+
await expect(this.homePage.externalLinks.issuesTracking).toBeVisible();
58+
await expect(this.homePage.externalLinks.github).toBeVisible();
9759
}
9860

9961
async testNavigationConsistency(): Promise<{

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -971,25 +971,6 @@ export class NotebookKeyboardPage extends BasePage {
971971
throw new Error(`No paragraphs found after ${timeout}ms - system appears broken`);
972972
}
973973

974-
async getCurrentCursorPosition(): Promise<{ line: number; column: number } | null> {
975-
try {
976-
return await this.page.evaluate(() => {
977-
// tslint:disable-next-line:no-any
978-
const win = (window as unknown) as any;
979-
const editor = win.monaco?.editor?.getModels?.()?.[0];
980-
if (editor) {
981-
const position = editor.getPosition?.();
982-
if (position) {
983-
return { line: position.lineNumber, column: position.column };
984-
}
985-
}
986-
return null;
987-
});
988-
} catch {
989-
return null;
990-
}
991-
}
992-
993974
async isSearchDialogVisible(): Promise<boolean> {
994975
const searchDialog = this.page.locator('.search-widget, .find-widget, [role="dialog"]:has-text("Find")');
995976
return await searchDialog.isVisible();
@@ -1007,13 +988,6 @@ export class NotebookKeyboardPage extends BasePage {
1007988
return selectedClass?.includes('focused') || selectedClass?.includes('selected') || false;
1008989
}
1009990

1010-
async getSelectedContent(): Promise<string> {
1011-
return await this.page.evaluate(() => {
1012-
const selection = window.getSelection();
1013-
return selection?.toString() || '';
1014-
});
1015-
}
1016-
1017991
async clickModalOkButton(timeout: number = 10000): Promise<void> {
1018992
// Wait for any modal to appear
1019993
const modal = this.page.locator('.ant-modal, .modal-dialog, .ant-modal-confirm');

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

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -103,29 +103,6 @@ export class NotebookPageUtil extends BasePage {
103103
}
104104
}
105105

106-
// ===== NAVIGATION VERIFICATION METHODS =====
107-
108-
async verifyNotebookNavigationPatterns(noteId: string): Promise<void> {
109-
await this.notebookPage.navigateToNotebook(noteId);
110-
expect(this.page.url()).toContain(`/#/notebook/${noteId}`);
111-
112-
await expect(this.notebookPage.notebookContainer).toBeVisible();
113-
}
114-
115-
async verifyRevisionNavigationIfSupported(noteId: string, revisionId: string): Promise<void> {
116-
await this.notebookPage.navigateToNotebookRevision(noteId, revisionId);
117-
expect(this.page.url()).toContain(`/#/notebook/${noteId}/revision/${revisionId}`);
118-
119-
await expect(this.notebookPage.notebookContainer).toBeVisible();
120-
}
121-
122-
async verifyParagraphModeNavigation(noteId: string, paragraphId: string): Promise<void> {
123-
await this.notebookPage.navigateToNotebookParagraph(noteId, paragraphId);
124-
expect(this.page.url()).toContain(`/#/notebook/${noteId}/paragraph/${paragraphId}`);
125-
126-
await expect(this.notebookPage.notebookContainer).toBeVisible();
127-
}
128-
129106
// ===== LAYOUT VERIFICATION METHODS =====
130107

131108
async verifyGridLayoutForParagraphs(): Promise<void> {

zeppelin-web-angular/e2e/tests/authentication/anonymous-login-redirect.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ test.describe('Anonymous User Login Redirect', () => {
6262
await waitForZeppelinReady(page);
6363
await page.waitForURL(url => !url.toString().includes('#/login'));
6464

65-
await homePageUtil.verifyHomePageIntegrity();
65+
await homePageUtil.verifyHomePageElements();
6666
});
6767

6868
test('When clicking Zeppelin logo after redirect, Then should maintain home URL and content', async ({ page }) => {

0 commit comments

Comments
 (0)