Files
openobserve/tests/ui-testing
ktx-akshay 1f1f57d7a6 fix: dashboard flaky testcases (#8820)
### **PR Type**
Enhancement, Tests


___

### **Description**
- Stabilize dashboard deletion flow waits

- Add networkidle waits around chart checks

- Use API/selector race for readiness

- Simplify success toast assertion


___

### Diagram Walkthrough


```mermaid
flowchart LR
  charts["Dashboard chart test"]
  networkIdle1["Wait networkidle before checks"]
  networkIdle2["Wait networkidle after boundingBox"]
  deletion["Delete dashboard util"]
  raceWait["Race: API response or table selector"]
  assertToast["Simplified success toast assertion"]

  charts -- "add waits" --> networkIdle1
  networkIdle1 -- "proceed" --> networkIdle2
  deletion -- "replace fixed waits" --> raceWait
  raceWait -- "proceed" --> assertToast
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>dashboard.spec.js</strong><dd><code>Add networkidle
waits around chart rendering checks</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright-tests/dashboards/dashboard.spec.js

<ul><li>Add networkidle wait before chart validation.<br> <li> Add
networkidle wait after fetching bounding box.</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8820/files#diff-d0fa0042783dc109334b05266edce228bad97adcb568dd1e447920596238e9b4">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>dashCreation.js</strong><dd><code>Robust deletion flow
with adaptive waiting logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright-tests/dashboards/utils/dashCreation.js

<ul><li>Replace fixed waits with API/selector race.<br> <li> Adjust
dashboard row locator formatting.<br> <li> Simplify success toast
visibility assertion.</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8820/files#diff-137f9f1fa23669cea684a9a98b42a9d04caaa18d75466b5605c717408e932122">+18/-5</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-10-16 13:20:45 +05:30
..
2024-11-13 15:13:36 +05:30

zinc-observe-ui-automation

Playwright UI Testing

Installation

npm install

Running Tests

cd playwright-runner
npm start

Then open http://localhost:3000 to access the test runner interface.

Using Command Line

# Run all tests
npx playwright test

# Run specific test by tag
npx playwright test -g @alertsImportExport

# Run in headed mode
npx playwright test --headed

# Run specific test file
npx playwright test Alerts/alerts-import.spec.js

Environment Configuration

Tests can be configured using:

  1. Playwright Runner UI - Set environment variables through the web interface
  2. Environment Variables - Set variables in terminal or .env file