Skip to content

Conversation

@ktx-akshay
Copy link
Collaborator

No description provided.

@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@ktx-akshay ktx-akshay force-pushed the stabilizing-dashboard-tests branch 2 times, most recently from c77d727 to f723e57 Compare November 26, 2025 13:21
@ktx-akshay ktx-akshay force-pushed the stabilizing-dashboard-tests branch from f723e57 to a338589 Compare November 27, 2025 05:17
@ktx-akshay ktx-akshay force-pushed the stabilizing-dashboard-tests branch from a338589 to e5da5d7 Compare November 27, 2025 06:49
@ktx-akshay ktx-akshay marked this pull request as ready for review November 27, 2025 07:57
@ktx-akshay ktx-akshay merged commit e4e0bb6 into main Nov 27, 2025
36 checks passed
@ktx-akshay ktx-akshay deleted the stabilizing-dashboard-tests branch November 27, 2025 07:57
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 27, 2025

Greptile Overview

Greptile Summary

Enhanced the addPanelToNewDashboard method in the UI test framework by adding multiple stability checks to prevent flaky test failures during dashboard creation flows.

Key Changes:

  • Added explicit waiting for side panel title element (schema-title-text) to ensure the "Add to Dashboard" panel fully loads before interaction
  • Introduced attached state verification in addition to visible state for critical UI elements (side panel, new dashboard button, dashboard name input)
  • Increased timeouts from 5 seconds to 10 seconds for initial visibility checks to accommodate slower rendering
  • Included commented-out hardcoded timeout fallbacks as documentation for potential future debugging needs
  • Moved dashboard name input visibility check before the click action to reduce race conditions

Impact:
These changes address timing issues where test automation was attempting to interact with UI elements before they were fully stable in the DOM, leading to intermittent test failures. The additional attached state checks ensure elements are not just visible but also properly connected to the DOM tree before interactions occur.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk - it only improves test stability without changing production code
  • The changes add defensive waiting strategies to prevent race conditions in UI tests. The implementation correctly uses Playwright's attached state checks and increases timeouts for more reliable test execution. No production code is affected, only test infrastructure.
  • No files require special attention - the changes are straightforward test stability improvements

Important Files Changed

File Analysis

Filename Score Overview
tests/ui-testing/pages/dashboardPages/visualise.js 4/5 Improved stability by adding additional state checks (attached state) and waiting for side panel elements before interactions to prevent flaky test failures

Sequence Diagram

sequenceDiagram
    participant Test as Test Suite
    participant Method as addPanelToNewDashboard()
    participant UI as UI Elements
    participant DOM as DOM Tree
    
    Test->>Method: Call with dashboard name & panel name
    Method->>UI: Click "Add to Dashboard" button
    Method->>UI: Wait for side panel title (visible, 10s)
    Method->>DOM: Wait for side panel title (attached, 5s)
    Note over Method,DOM: Ensures panel is fully loaded
    
    Method->>UI: Wait for "New Dashboard" button (visible, 10s)
    Method->>DOM: Wait for "New Dashboard" button (attached, 5s)
    Note over Method,DOM: Ensures button is stable in DOM
    
    Method->>UI: Click "New Dashboard" button
    
    Method->>UI: Wait for dashboard name input (visible, 10s)
    Method->>DOM: Wait for dashboard name input (attached, 5s)
    Note over Method,DOM: Ensures dialog is stable
    
    Method->>UI: Click dashboard name input
    Method->>UI: Fill dashboard name
    Method->>UI: Click submit button
    Method->>UI: Wait for panel title input (visible, 10s)
    Method->>UI: Fill panel name
    Method->>UI: Click update settings button
    Method-->>Test: Dashboard creation complete
Loading

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.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

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