-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Explorepage right panel tests using POM #25451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Code Review 👍 Approved with suggestions 0 resolved / 5 findingsNew E2E test suite with well-structured Page Object pattern; has some robustness issues around error handling and locator scoping that should be addressed.
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
|
|
||
| // Test upstream/downstream buttons (may not be visible if no lineage exists) | ||
| try { | ||
| await lineage.clickUpstreamButton(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details
The test file has multiple empty catch blocks that silently swallow exceptions, which can hide actual test failures and make debugging difficult. In lines 204-208, 210-214, 240-242, 244-246, the try-catch blocks catch errors but do nothing with them.
For example:
try {
await lineage.clickUpstreamButton();
await lineage.shouldShowExpandUpstreamButton();
} catch {
// Expected if no upstream lineage exists
await lineage.shouldNotShowExpandUpstreamButton();
}This pattern masks actual bugs - if clickUpstreamButton() fails due to an unexpected reason (like a selector bug or race condition), the test won't report the failure.
Suggested fix: Use explicit conditional checks instead of try-catch, or at minimum verify the expected state before attempting the action:
const hasUpstreamButton = await lineage.isUpstreamButtonVisible();
if (hasUpstreamButton) {
await lineage.clickUpstreamButton();
await lineage.shouldShowExpandUpstreamButton();
} else {
await lineage.shouldNotShowExpandUpstreamButton();
}Alternatively, if using try-catch, verify the error type matches expectations.
Was this helpful? React with 👍 / 👎
|



Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
ExplorePageRightPanel.spec.tscovers Overview, Schema, Lineage, Data Quality, and Custom Properties tabsOverviewPageObject,SchemaPageObject,LineagePageObject,DataQualityPageObject,CustomPropertiesPageObject, andRightPanelPageObjectimplement fluent API patternnavigateToExploreAndSelectEntityinentityPanel.tshandles explore page navigation with asset type selectionThis will update automatically on new commits.