[ZEPPELIN-6358] simplify utils, promote POM usage, and consolidate base logic from #5101#5131
Open
dididy wants to merge 8 commits intoapache:masterfrom
Open
[ZEPPELIN-6358] simplify utils, promote POM usage, and consolidate base logic from #5101#5131dididy wants to merge 8 commits intoapache:masterfrom
dididy wants to merge 8 commits intoapache:masterfrom
Conversation
tbonelee
requested changes
Jan 4, 2026
Comment on lines
87
to
110
| async clickFirstVisibleElement( | ||
| selectors: string[], | ||
| options?: { | ||
| parent?: Locator; | ||
| visibilityTimeout?: number; | ||
| clickTimeout?: number; | ||
| } | ||
| ): Promise<boolean> { | ||
| const { parent, visibilityTimeout = 2000, clickTimeout = 5000 } = options || {}; | ||
| const baseLocator = parent || this.page; | ||
|
|
||
| for (const selector of selectors) { | ||
| try { | ||
| const element = baseLocator.locator(selector); | ||
| if (await element.isVisible({ timeout: visibilityTimeout })) { | ||
| await element.click({ timeout: clickTimeout }); | ||
| return true; | ||
| } | ||
| } catch (e) { | ||
| continue; | ||
| } | ||
| } | ||
| return false; | ||
| } |
Contributor
There was a problem hiding this comment.
We could remove this if it isn't used anywhere.
Comment on lines
48
to
53
| try { | ||
| await this.welcomeTitle.waitFor({ state: 'visible', timeout: 5000 }); | ||
| return true; | ||
| } catch (e) { | ||
| return false; | ||
| } |
Contributor
There was a problem hiding this comment.
This method is not being used.
Comment on lines
57
to
62
| if (browserName === 'webkit') { | ||
| const currentUrl = page.url(); | ||
| await page.goto(currentUrl, { waitUntil: 'load' }); | ||
| } else { | ||
| page.reload(); | ||
| } |
Contributor
There was a problem hiding this comment.
Could you add some comments about this if-else branch?
Contributor
Author
There was a problem hiding this comment.
This logic was originally added as a workaround for an issue that occurred only on WebKit after upgrading Playwright to a newer version. Since it is expected to work correctly on WebKit with the current Playwright version, I removed the conditional handling. I’ll verify the CI results and address any issues if needed. I also cleaned up other unused and unnecessary methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR for?
PR Description
This PR improves the readability and maintainability of the E2E notebook tests.
As a result, the tests are clearer, flatter, and easier to maintain.
What type of PR is it?
Refactoring
Todos
What is the Jira issue?
ZEPPELIN-6358
How should this be tested?
Screenshots (if appropriate)
Questions: