Skip to content

Conversation

@ktx-akshay
Copy link
Collaborator

No description provided.

@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: 044bbd9

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 367 343 0 19 5 93% 4m 38s

View Detailed Results

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

Failed to generate code suggestions for PR

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: a8da46e

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 367 343 0 19 5 93% 4m 38s

View Detailed Results

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 Contains operator in dashboard filters and enhances the test_summary.py test to be more robust.

Key changes:

  • Added new Playwright test verifying that the Contains operator correctly generates str_match() SQL queries when applied to dashboard filters with variables
  • Enhanced test_summary function to support fallback from base_url_sc to base_url when super cluster URL is unavailable
  • Fixed dashboard ID extraction logic to handle both v5 and v6 dashboard schema versions
  • Fixed indentation issues where cleanup code (function, dashboard, stream deletion) was incorrectly nested inside the alert deletion loop

Notes:

  • The test additions are comprehensive and follow existing test patterns
  • The dashboard schema version handling (v5/v6) improves test robustness against API changes

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The changes add test coverage and improve test robustness. The new Contains operator test is comprehensive and follows existing patterns. The test_summary.py changes fix real issues (indentation/scoping problems) and add proper fallback handling. Only minor style improvement suggested (using logging instead of print statements).
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
tests/api-testing/tests/test_summary.py 4/5 Enhanced test to support base_url fallback and handle both v5/v6 dashboard schemas; refactored indentation and fixed deletion logic scoping
tests/ui-testing/playwright-tests/dashboards/dashboard-filter.spec.js 5/5 Added new test validating Contains operator generates correct str_match() SQL query for dashboard filters with variables

Sequence Diagram

sequenceDiagram
    participant Test as Test Suite
    participant Browser as Playwright Browser
    participant Dashboard as Dashboard UI
    participant Filter as Filter Component
    participant Query as Query Inspector
    participant API as Backend API

    Note over Test,API: New Contains Operator Test Flow
    Test->>Browser: Navigate to dashboards
    Browser->>Dashboard: Load dashboard page
    Test->>Dashboard: Create new dashboard
    Test->>Dashboard: Open dashboard settings
    Test->>Dashboard: Add variable (variablename)
    Test->>Dashboard: Add panel with e2e_automate stream
    Test->>Dashboard: Select variable value (ziox)
    Test->>Filter: Add filter field (kubernetes_container_name)
    Test->>Filter: Add filter condition (Contains, $variablename)
    Filter->>API: Apply filter with Contains operator
    API-->>Dashboard: Return filtered data
    Test->>Query: Open query inspector
    Query-->>Test: Display SQL query
    Test->>Test: Verify str_match() function in SQL
    Note over Test: Assert: WHERE str_match(kubernetes_container_name, 'ziox')
    Test->>Dashboard: Save panel
    Test->>Dashboard: Delete dashboard
Loading

2 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

url_sc = base_url_sc
# Use base_url_sc if available, otherwise fall back to base_url
url_sc = base_url_sc if base_url_sc is not None else base_url
print("URL for super cluster:", url_sc)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: multiple print statements throughout this test; use logging framework instead for better control over test output

Context Used: Context from dashboard - Use a logging framework instead of print statements for debugging in tests to allow better control o... (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/api-testing/tests/test_summary.py
Line: 346:346

Comment:
**style:** multiple print statements throughout this test; use logging framework instead for better control over test output

**Context Used:** Context from `dashboard` - Use a logging framework instead of print statements for debugging in tests to allow better control o... ([source](https://app.greptile.com/review/custom-context?memory=befcce0d-3612-43a4-bad9-e9446a1b7237))

How can I resolve this? If you propose a fix, please make it concise.

@ktx-akshay ktx-akshay requested review from ByteBaker and neha00290 and removed request for ByteBaker October 30, 2025 07:12
@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: 1b0adc3

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
1 test failed 247 227 1 17 2 92% 3m 45s

Test Failure Analysis

  1. dashboard-streaming.spec.js: Timeout issues while interacting with UI elements
    1. dashboard streaming testcases should verify the custom value search from variable dropdown with streaming enabled: Locator timeout waiting for button[data-test="dashboard-add-custom-value-btn"] to be clickable.

Root Cause Analysis

  • The changes in dashboard-variables.js introduced a new parameter, which may have affected the timing of UI interactions.

Recommended Actions

  1. Increase the timeout duration for the locator in dashboard-variables.js to ensure the button is clickable. 2. Verify the visibility of the button before attempting to click it in the addDashboardVariable method. 3. Add explicit waits or checks to ensure the UI is fully loaded before executing the click action.

View Detailed Results

@testdino-playwright-reporter
Copy link

Test Run Failed

Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: 4a7f262

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
1 test failed 130 118 1 11 0 91% 3m 50s

Test Failure Analysis

  1. dashboard-filter.spec.js: Timeout issues while waiting for elements to be clickable
    1. dashboard filter testcases should verify the custom value search from variable dropdown: Timeout waiting for locator '[data-test="dashboard-add-custom-value-btn"]' to be clickable.

Root Cause Analysis

  • The timeout error in dashboard-filter.spec.js is likely due to recent changes in the test logic that may have introduced delays in element visibility.

Recommended Actions

  1. Increase the timeout duration for the click action on '[data-test="dashboard-add-custom-value-btn"]' in dashboard-filter.spec.js. 2. Ensure that the element is visible and enabled before attempting to click it. 3. Add explicit waits or checks for the element's state before the click action.

View Detailed Results

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: ca2e24c

Testdino Test Results

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

View Detailed Results

@ktx-akshay ktx-akshay force-pushed the e2e-test-for-contains-in-dashboard-filter branch from ca2e24c to b661d99 Compare October 30, 2025 12:23
@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: b661d99

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 371 349 0 19 3 94% 4m 40s

View Detailed Results

@ktx-akshay ktx-akshay force-pushed the e2e-test-for-contains-in-dashboard-filter branch from b661d99 to 22e6115 Compare October 31, 2025 05:57
@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: 22e6115

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 371 346 0 19 6 93% 5m 41s

View Detailed Results

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: d3fb839

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 377 348 0 19 10 92% 5m 43s

View Detailed Results

@ktx-akshay ktx-akshay force-pushed the e2e-test-for-contains-in-dashboard-filter branch from d3fb839 to 32c256a Compare October 31, 2025 08:49
@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: 83acdf4

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 377 350 0 19 8 93% 5m 42s

View Detailed Results

@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: 83acdf4

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 376 350 0 19 7 93% 5m 41s

View Detailed Results

@ktx-akshay ktx-akshay force-pushed the e2e-test-for-contains-in-dashboard-filter branch from 83acdf4 to 81b73f7 Compare October 31, 2025 09:47
@testdino-playwright-reporter
Copy link

⚠️ Test Run Unstable


Author: ktx-akshay | Branch: e2e-test-for-contains-in-dashboard-filter | Commit: 81b73f7

Testdino Test Results

Status Total Passed Failed Skipped Flaky Pass Rate Duration
All tests passed 376 348 0 19 9 93% 5m 40s

View Detailed Results

@ktx-akshay ktx-akshay changed the title test: add test for applying Contains operator in dashboard filter test: add test cases for various filter operators in dashboard Oct 31, 2025
@ktx-akshay ktx-akshay merged commit e8f93ca into main Oct 31, 2025
34 of 36 checks passed
@ktx-akshay ktx-akshay deleted the e2e-test-for-contains-in-dashboard-filter branch October 31, 2025 10:36
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