Skip to content

Conversation

@Shrinath-O2
Copy link
Contributor

No description provided.

@Shrinath-O2 Shrinath-O2 added this to the v0.30.0 milestone Dec 2, 2025
@Shrinath-O2 Shrinath-O2 changed the title test: added retry mechanism for clicking add new dashboard button test: reports test stabilisation for env Dec 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 2, 2025

Greptile Overview

Greptile Summary

Improved the createDashboard() method in DashboardPage by replacing a blanket 5-second waitForTimeout with an intelligent retry mechanism that:

  • Checks if the dashboard name input field is visible after clicking the "Add Dashboard" button
  • If not visible, waits 1 second and retries the button click once
  • Throws a clear error message if the field is still not visible after the retry

This change makes the test more resilient to timing issues in deployed environments while also potentially reducing test execution time when the dialog opens quickly on the first click.

Confidence Score: 4/5

  • This PR is safe to merge - it improves test stability with a simple, localized change to UI test logic.
  • Score of 4 reflects that the change is a straightforward test improvement using patterns already established in the codebase. The logic is simple and the risk is limited to UI test execution.
  • No files require special attention.

Important Files Changed

File Analysis

Filename Score Overview
tests/ui-testing/pages/dashboardPages/dashboardPage.js 4/5 Added retry mechanism for dashboard creation button click, replacing a hard 5-second wait with a smarter approach that checks visibility and retries once if needed.

Sequence Diagram

sequenceDiagram
    participant Test as Test Case
    participant DP as DashboardPage
    participant Page as Browser Page
    participant UI as Dashboard UI

    Test->>DP: createDashboard()
    DP->>Page: waitForSelector('[data-test="dashboard-add"]')
    DP->>UI: click addDashboardButton
    DP->>UI: check isVisible() on dashboardNameInput
    
    alt Name field visible
        DP->>UI: fill dashboard name
    else Name field NOT visible
        DP->>Page: waitForTimeout(1000)
        DP->>UI: click addDashboardButton (retry)
        DP->>Page: waitForTimeout(2000)
        DP->>UI: check isVisible() again
        
        alt Still not visible
            DP-->>Test: throw Error
        else Now visible
            DP->>UI: fill dashboard name
        end
    end
    
    DP->>UI: click submit button
    DP->>UI: continue with panel setup...
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

@Shrinath-O2 Shrinath-O2 force-pushed the e2e-reportsTestStabilisation branch from 390e3d1 to 1001142 Compare December 3, 2025 01:21
@Shrinath-O2 Shrinath-O2 force-pushed the e2e-reportsTestStabilisation branch from c14f88f to 660afaf Compare December 3, 2025 03:46
@Shrinath-O2 Shrinath-O2 merged commit 9e3d950 into main Dec 3, 2025
38 of 40 checks passed
@Shrinath-O2 Shrinath-O2 deleted the e2e-reportsTestStabilisation branch December 3, 2025 04:32
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