Skip to content

Conversation

@ktx-akshay
Copy link
Collaborator

No description provided.

@ktx-akshay ktx-akshay force-pushed the dashboard-tests-stable-deployed branch from 3f12e15 to 8b5c828 Compare November 27, 2025 12:38
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@ktx-akshay ktx-akshay force-pushed the dashboard-tests-stable-deployed branch from 8b5c828 to 5d8d8bb Compare November 27, 2025 13:06
@ktx-akshay ktx-akshay marked this pull request as ready for review November 27, 2025 13:06
@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

This PR improves test stability for dashboard-related UI tests by adding explicit wait mechanisms before dashboard interactions.

Key changes:

  • Added waitForDashboardUIStable() helper method that waits for critical UI elements (search input, New Dashboard button, import button) to be fully loaded before test interactions
  • Enhanced addVariable() method with more robust field selection logic using multiple fallback strategies (exact match, partial match, keyboard navigation)
  • Applied the stability helper across 17 test cases in dashboard transpose and variable settings test suites

The changes follow consistent patterns from existing code (dashboard-variables.js) and address timing issues by ensuring the UI is stable before interactions.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are test-only improvements that add stability mechanisms without modifying application code. The wait logic is defensive and uses reasonable timeouts. The multi-strategy field selection pattern is borrowed from existing working code.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
tests/ui-testing/pages/dashboardPages/dashboard-create.js 5/5 Added waitForDashboardUIStable() method to ensure UI elements are fully loaded before interactions
tests/ui-testing/pages/dashboardPages/dashboard-settings.js 5/5 Enhanced addVariable() with explicit waits and multi-strategy field selection for better test stability
tests/ui-testing/playwright-tests/dashboards/dashboard-transpose.spec.js 5/5 Added waitForDashboardUIStable() calls before dashboard operations in 5 test cases
tests/ui-testing/playwright-tests/dashboards/dashboard-variables-setting.spec.js 5/5 Added waitForDashboardUIStable() calls before dashboard operations in 12 test cases

Sequence Diagram

sequenceDiagram
    participant Test as Test Suite
    participant Page as Page Object
    participant UI as Dashboard UI
    participant API as Backend API

    Test->>Page: Navigate to dashboards
    Test->>Page: waitForDashboardUIStable()
    
    Page->>UI: Wait for search input (visible)
    UI-->>Page: Element visible
    Page->>UI: Wait for search input (attached)
    UI-->>Page: Element attached
    
    Page->>UI: Wait for New Dashboard button (visible)
    UI-->>Page: Element visible
    Page->>UI: Wait for New Dashboard button (attached)
    UI-->>Page: Element attached
    
    Page->>UI: Wait for Import button (visible)
    UI-->>Page: Element visible
    Page->>UI: Wait for Import button (attached)
    UI-->>Page: Element attached
    
    Page->>Page: Wait 500ms for animations
    Page-->>Test: UI stable, ready for interaction
    
    Test->>Page: createDashboard(name)
    Page->>UI: Click New Dashboard
    UI->>API: Create dashboard request
    API-->>UI: Dashboard created
    
    Test->>Page: addVariable(type, name, stream, field)
    Page->>UI: Wait for dropdown options
    UI-->>Page: Options loaded
    
    alt Exact match found
        Page->>UI: Click exact field match
    else No exact match
        alt Partial match found
            Page->>UI: Click first partial match
        else No partial match
            Page->>UI: Use keyboard navigation (ArrowDown + Enter)
        end
    end
    
    UI-->>Page: Field selected
    Page-->>Test: Variable added successfully
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.

4 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@Shrinath-O2 Shrinath-O2 force-pushed the dashboard-tests-stable-deployed branch from 5d8d8bb to b2c3bbc Compare November 28, 2025 01:26
@ktx-akshay ktx-akshay force-pushed the dashboard-tests-stable-deployed branch 2 times, most recently from 2fe2568 to 1f64089 Compare November 28, 2025 07:05
@ktx-akshay ktx-akshay force-pushed the dashboard-tests-stable-deployed branch from 1f64089 to 84f26f5 Compare November 28, 2025 08:42
@ktx-akshay ktx-akshay merged commit dd0206b into main Nov 28, 2025
35 of 37 checks passed
@ktx-akshay ktx-akshay deleted the dashboard-tests-stable-deployed branch November 28, 2025 09:41
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.

2 participants