mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
### **User description**
## Summary
- Fixes 13 flaky Reports tests that were failing due to unstable
dashboard creation
- Add proper waits for button enablement before clicking submit
- Wait for success notification and URL navigation after dashboard
creation
- Use data-test selector for stream dropdown selection
- Replace scroll-based field selection with search-based approach
- Extract inline locators to constructor for better maintainability
## Test Results
All 13 previously failing tests now pass:
- `reportsScheduleNow.spec.js`: 7 passed
- `reportsScheduleLater.spec.js`: 6 passed
## Test Command
```bash
npx playwright test "playwright-tests/Reports/" --project=chromium
```
___
### **PR Type**
Bug fix, Tests, Enhancement
___
### **Description**
- Stabilize dashboard creation with robust waits
- Replace scrolling with search-based field selection
- Refactor locators and error handling across methods
- Add new cleanup regex patterns for streams
___
### Diagram Walkthrough
```mermaid
flowchart LR
A["Navigate to dashboards"] --> B["Open create dialog"]
B --> C["Fill name & submit"]
C --> D["Wait for success & navigate"]
D --> E["Add panel: select stream & fields"]
E --> F["Apply panel & verify"]
```
<details> <summary><h3> File Walkthrough</h3></summary>
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>dashboardPage.js</strong><dd><code>Improve dashboard
E2E test stability</code>
</dd></summary>
<hr>
tests/ui-testing/pages/dashboardPages/dashboardPage.js
<ul><li>Added locators for menus, dashboards, panels, streams, and
charts <br> <li> Enhanced createDashboard with waitForLoadState,
retries, and expect <br>checks <br> <li> Switched field selection from
scrolling to search-based approach <br> <li> Refactored delete, logout,
share, and org-switch methods</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9811/files#diff-febeab93d1b7b929f386f852b74aa1ab16086626891d08b815afc21414b22704">+180/-121</a></td>
</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>cleanup.spec.js</strong><dd><code>Add new cleanup
stream patterns</code>
</dd></summary>
<hr>
tests/ui-testing/playwright-tests/cleanup.spec.js
<ul><li>Introduced regex cleanup patterns for alert_e2e and alert_import
<br>streams <br> <li> Added dedup_test and dedup_src stream cleanup
rules</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9811/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+4/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___