Files
openobserve/tests
Ashish Kolhe cb178787f2 chore: incidents as separate tabs (#9819)
### **PR Type**
Enhancement, Tests


___

### **Description**
- Replace icon tabs with reusable app-tabs component

- Introduce Alerts/Incidents viewMode switching logic

- Add extensive UI tests for new tab functionality

- Update getPath logic and dev script configuration


___

### Diagram Walkthrough


```mermaid
flowchart LR
  TabsComp["app-tabs component"] --> ViewState["viewMode state"]
  ViewState --> AlertsView["Alerts view UI"]
  ViewState --> IncidentsView["Incidents view UI"]
  Tests["UI tests"] --> TabsComp
```



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

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>zincutils.ts</strong><dd><code>Refine getPath base URL
logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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>

web/src/utils/zincutils.ts

<ul><li>refine getPath logic for web base path<br> <li> conditionally
prepend "/web/" on localhost</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9819/files#diff-d3d59688cccdcc6c84ebe88b698c6910030abecc3125f4c0ef81b0df023699ba">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>AlertList.vue</strong><dd><code>Replace custom tabs
with app-tabs</code>&nbsp; &nbsp; &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>

web/src/components/alerts/AlertList.vue

<ul><li>remove custom icon-only view tabs<br> <li> integrate
<code>app-tabs</code> for view switching<br> <li> add
<code>viewTabs</code> computed property<br> <li> update related SCSS
styling</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9819/files#diff-be3e41b823e163b226ffc270d95cc4981e59c600851e4e0d10ee5e4ee994ac8e">+35/-92</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>alertsPage.js</strong><dd><code>Add view mode tab
methods and locators</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/pages/alertsPages/alertsPage.js

<ul><li>add locators for alert and incident tabs<br> <li> implement
click and expect methods for tabs<br> <li> add search methods for both
views</ul>


</details>


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

</tr>

<tr>
  <td>
    <details>
<summary><strong>alertsIncidentsTabs.spec.js</strong><dd><code>Add E2E
tests for alerts/incidents tabs</code>&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

<ul><li>add E2E tests for tabs visibility and switching<br> <li> cover
functional and edge-case scenarios</ul>


</details>


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

</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>package.json</strong><dd><code>Add base path to dev
script</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&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>

web/package.json

- update `dev` script to include base `/web/`


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9819/files#diff-b861012a5dd72b8a9f3281b7cf09f5a779c98569d040b1bbc1db50f1b15e7cce">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

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

</details>

___
2026-01-02 14:11:31 +05:30
..
2024-09-22 17:57:47 +08:00