Files
openobserve/.github/workflows
ktx-akshay e4f0040fee test: add PromQL query persistence tests for metrics (#10100)
### **PR Type**
Tests, Enhancement


___

### **Description**
- Add PromQL query persistence e2e suite

- Introduce Metrics query editor page object

- Improve tab switching, query entry, polling

- Run new spec in Playwright workflow


___

### Diagram Walkthrough


```mermaid
flowchart LR
  spec["`metrics-promql-query-persistence.spec.js` (test suite)"]
  pom["`metricsQueryEditorPage.js` (page object)"]
  pm["`page-manager.js` (page registry)"]
  gha["`.github/workflows/playwright.yml` (CI matrix)"]
  spec -- "uses helpers" --> pom
  pm -- "exposes" --> pom
  gha -- "executes" --> spec
```



<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>metricsQueryEditorPage.js</strong><dd><code>Add Metrics
query editor Page Object</code>&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/pages/metricsPages/metricsQueryEditorPage.js

<ul><li>Add <code>MetricsQueryEditorPage</code> for metrics editor
interactions<br> <li> Implement robust mode switching to PromQL
Custom<br> <li> Provide resilient query entry (Monaco API +
keyboard)<br> <li> Add tab management, polling, and debug
screenshots</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10100/files#diff-6f21fa6fca05591f7dabdedcaa62f188f9f04185ef924157c893cdd3e8e5c6a0">+481/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>metrics-promql-query-persistence.spec.js</strong><dd><code>Add
PromQL query persistence test suite</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/Metrics/metrics-promql-query-persistence.spec.js

<ul><li>Add serial e2e suite covering tab query persistence<br> <li>
Validate auto-populated queries on stream selection<br> <li> Test
multi-tab isolation and rapid switching stress<br> <li> Use polling, Run
Query, and screenshots for stability</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10100/files#diff-3e8bacf0b1c46620d12216d1b14581b1b63fc683dbb7f0a89b039e0853f5d664">+447/-0</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>page-manager.js</strong><dd><code>Register
MetricsQueryEditorPage in PageManager</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/pages/page-manager.js

<ul><li>Import <code>MetricsQueryEditorPage</code> in page manager<br>
<li> Instantiate <code>this.metricsQueryEditorPage</code> for shared
use</ul>


</details>


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

</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>playwright.yml</strong><dd><code>Include new metrics
persistence spec in CI</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

.github/workflows/playwright.yml

<ul><li>Add <code>metrics-promql-query-persistence.spec.js</code> to
workflow test list</ul>


</details>


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

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

</details>

___
2026-02-06 18:49:40 +05:30
..