Files
openobserve/tests
Shrinath Rao 3231f5f960 fix(e2e): consolidate and stabilize alerts-incidents-tabs tests (#9837)
### **User description**
## Summary
- Consolidated 13 test cases into 5 comprehensive tests for the
Alerts/Incidents tabs feature
- Tests 1-3: UI validation, search functionality, edge cases (enterprise
feature, running)
- Tests 4-5: Incident lifecycle actions and drawer validation
(enterprise feature, skipped - requires incidents to exist)
- Added incident-related POM methods to alertsPage.js
- Fixed view tab locators to use correct AppTabs pattern (tab-alerts,
tab-incidents)
- Added `waitForViewTabsReady()` method for stable test setup
- Added incident cleanup patterns to cleanup.spec.js
- Marked entire suite as @enterprise feature since Alerts/Incidents is
enterprise-only

## Test Results
- 3 passed, 2 skipped (~32s)

## Test plan
- [x] Run alerts-incidents-tabs.spec.js - all 3 OSS tests pass
- [x] Verify 2 enterprise tests are correctly skipped
- [x] Cleanup patterns added for incident_e2e_* resources


___

### **PR Type**
Enhancement, Tests


___

### **Description**
- Enhance AlertsPage POM with incident locators

- Add helpers for view tabs and loading overlay

- Consolidate comprehensive alerts-incidents E2E tests

- Extend cleanup to include incident_e2e patterns


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Navigate to Alerts Page"] --> B["waitForLoadingOverlayToDisappear"]
  B --> C["waitForAlertListPageReady"]
  C --> D["waitForViewTabsReady"]
  D --> E1["Test1: View UI Validation"]
  D --> E2["Test2: Search Functionality"]
  D --> E3["Test3: Edge Cases"]
```



<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>alertsPage.js</strong><dd><code>Enhance AlertsPage with
incident methods and locators</code>&nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

tests/ui-testing/pages/alertsPages/alertsPage.js

<ul><li>Added locators for incidents, drawer, and page structure<br>
<li> Introduced waitForViewTabsReady and loading overlay helpers<br>
<li> Added assertion helpers for alerts/incidents visibility<br> <li>
Implemented incident lifecycle and drawer methods</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9837/files#diff-79ee01d6d7f145f19207b93b87143b545a1188cfc6a82bc8c45fecfbf68f8a1d">+329/-8</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>commonActions.js</strong><dd><code>Use
`alert-list-page` in navigation check</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/pages/commonActions.js

- Updated navigateToAlerts to check `alert-list-page`


</details>


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

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>alerts-incidents-tabs.spec.js</strong><dd><code>New
Alerts/Incidents tabs E2E tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright-tests/Alerts/alerts-incidents-tabs.spec.js

<ul><li>Added new comprehensive E2E suite for Alerts/Incidents tabs<br>
<li> Consolidates view UI, search, and edge case tests<br> <li> Skips
enterprise incident action tests</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9837/files#diff-53a1a0dc2f68166f18211c151ef356b87a34b39fe6b3d2af5263a4036ae2dd99">+413/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>alertsIncidentsTabs.spec.js</strong><dd><code>Remove
legacy alertsIncidentsTabs spec</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright-tests/Alerts/alertsIncidentsTabs.spec.js

- Removed deprecated Alerts & Incidents tab spec file


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9837/files#diff-3776665660a181de2d08e4d3bccc481191e7ac88f4e4b0943c869ffa4eb12ffd">+0/-347</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>cleanup.spec.js</strong><dd><code>Add `incident_e2e`
cleanup patterns</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright-tests/cleanup.spec.js

- Extended cleanup patterns for `incident_e2e` resources


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9837/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+7/-4</a>&nbsp;
&nbsp; &nbsp; </td>

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

</details>

___
2026-01-05 16:37:06 +05:30
..
2024-09-22 17:57:47 +08:00