Skip to content

Conversation

@ktx-akshay
Copy link
Collaborator

No description provided.

@ktx-akshay ktx-akshay force-pushed the enable-connect-nulls-config-for-visualization branch from 591ce81 to 14138bd Compare October 28, 2025 08:51
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: enable-connect-nulls-config-for-visualization | Commit: 14138bd

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 366 342 0 19 5 93% 4m 41s

View Detailed Results

@ktx-akshay ktx-akshay force-pushed the enable-connect-nulls-config-for-visualization branch from 14138bd to 6488e0b Compare October 28, 2025 10:25
@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: enable-connect-nulls-config-for-visualization | Commit: 6488e0b

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 366 343 0 19 4 94% 4m 39s

View Detailed Results

@ktx-akshay ktx-akshay marked this pull request as ready for review October 28, 2025 10:49
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 to true when visualizing histogram queries with HAVING clauses.

Key Changes:

  • Added page object methods (getConnectNullValuesState() and verifyConnectNullValuesToggle()) to dashboard-panel-configs.js following 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 histogramQueryWithHaving added for testing this specific scenario

Quality Notes:

  • Implementation follows existing codebase patterns (mirroring verifyQuickModeToggle approach)
  • 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 methods getConnectNullValuesState() and verifyConnectNullValuesToggle() 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")
Loading

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@ktx-akshay ktx-akshay merged commit 8f495b5 into main Oct 28, 2025
33 checks passed
@ktx-akshay ktx-akshay deleted the enable-connect-nulls-config-for-visualization branch October 28, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants