- Notifications
You must be signed in to change notification settings - Fork715
test: chart rendering with connect null values enabled testcase#8899
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
591ce81 to14138bdCompareFailed to generate code suggestions for PR |
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 366 | 342 | 0 | 19 | 5 | 93% | 4m 41s |
14138bd to6488e0bCompare
|
| Status | Total | Passed | Failed | Skipped | Flaky | Pass Rate | Duration |
|---|---|---|---|---|---|---|---|
| All tests passed | 366 | 343 | 0 | 19 | 4 | 94% | 4m 39s |
Failed to generate code suggestions for PR |
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.
Greptile Overview
Greptile Summary
This PR adds test coverage for the "connect null values" toggle functionality in dashboard visualization config. The test verifies that the toggle defaults totrue when visualizing histogram queries with HAVING clauses.
Key Changes:
- Added page object methods (
getConnectNullValuesState()andverifyConnectNullValuesToggle()) todashboard-panel-configs.jsfollowing existing patterns for toggle state verification - Added new test case to verify default state of connect null values toggle with histogram queries containing HAVING clauses
- New SQL query constant
histogramQueryWithHavingadded for testing this specific scenario
Quality Notes:
- Implementation follows existing codebase patterns (mirroring
verifyQuickModeToggleapproach) - Test includes dual assertions (custom verification method + Playwright expect) for robustness
- Uses
waitForTimeout(1000)which is acceptable for waiting on UI panel visibility in this context
Confidence Score: 5/5
- This PR is safe to merge with minimal risk - adds test coverage without modifying production code
- The PR only adds test code following established patterns in the codebase. The page object methods mirror existing toggle verification methods (like
verifyQuickModeToggle), ensuring consistency. The test case is straightforward and well-structured with clear steps. No production code changes means zero risk of runtime issues. - No files require special attention
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| tests/ui-testing/pages/dashboardPages/dashboard-panel-configs.js | 5/5 | Adds page object methodsgetConnectNullValuesState() andverifyConnectNullValuesToggle() following existing patterns for toggle verification |
| tests/ui-testing/playwright-tests/dashboards/visualize.spec.js | 5/5 | Adds test case verifying connect null values toggle defaults to true for histogram queries with HAVING clause |
Sequence Diagram
sequenceDiagram participant Test as Test Suite participant PM as PageManager participant Visualise as LogsVisualise participant PanelConfig as DashboardPanelConfigs participant UI as Dashboard UI Test->>PM: Create PageManager instance Test->>Visualise: openLogs() Test->>Visualise: fillLogsQueryEditor(histogramQueryWithHaving) Test->>Visualise: setRelative("6", "w") Test->>Visualise: logsApplyQueryButton() Test->>Visualise: openVisualiseTab() Visualise->>UI: Switch to visualization tab Test->>Visualise: verifyChartRenders(page) Visualise-->>Test: Chart renders successfully Test->>PanelConfig: Create DashboardPanelConfigs instance Test->>PanelConfig: openConfigPanel() PanelConfig->>UI: Click config sidebar UI-->>PanelConfig: Config panel visible Test->>Test: waitForTimeout(1000) Test->>PanelConfig: verifyConnectNullValuesToggle(true) PanelConfig->>PanelConfig: getConnectNullValuesState() PanelConfig->>UI: waitFor connectNullValuesToggle visible PanelConfig->>UI: getAttribute("aria-checked") alt aria-checked is null PanelConfig->>UI: getAttribute("aria-pressed") end UI-->>PanelConfig: Return "true" PanelConfig->>PanelConfig: Validate expected vs actual state PanelConfig-->>Test: Return toggle state (true) Test->>Test: expect(connectNullState).toBe(true) Test->>UI: Locate connect null toggle Test->>UI: expect toHaveAttribute("aria-checked", "true")2 files reviewed, no comments
8f495b5 intomainUh oh!
There was an error while loading.Please reload this page.
No description provided.