Files
openobserve/tests/ui-testing/package.json
T
Shrinath Rao e066619e09 test: overhaul dashboard variables E2E tests with Page Object Model and parallel execution stability (#10393)
### **User description**
## Summary

Comprehensive rework of Dashboard Variables E2E test suite to improve
stability for parallel execution and consolidate redundant tests.

### Test Stability Improvements
- Add centralized selectors in `dashboard-selectors.js` for consistent
element targeting
- Implement enhanced retry mechanisms with exponential backoff in
`wait-helpers.js`
- Add proper `waitForDashboardUIStable()` and `waitForDataLoad()`
patterns across page objects
- Fix race conditions in parallel test execution with network idle waits

### Test Consolidation
- Merge `dashboard-variables-null-handling.spec.js` into
`dashboard-variables-dependency.spec.js` (single test moved)
- Remove 2 redundant tests from `dashboard-variables-global.spec.js`
(duplicate coverage with setting.spec.js)
- **Result: 71 → 69 tests** while maintaining full coverage

### CI/CD Improvements  
- Consolidate **5 dashboard variables shards into 1**
"Dashboards-Variables" shard in `playwright.yml`
- Group all dashboard variable specs in single workflow job for
efficiency

### Files Modified
| Change | File |
|--------|------|
| ✅ Add | `dashboard-selectors.js` (centralized selectors) |
| ❌ Delete | `dashboard-variables-null-handling.spec.js` (merged) |
| ✏️ Modify | All dashboard variable spec files for stability |
| ✏️ Modify | `playwright.yml` workflow for shard consolidation |
| ✏️ Modify | `dashboard-create.js`, `dashCreation.js` (retry patterns)
|
| ✏️ Modify | `wait-helpers.js` (enhanced wait utilities) |

## Test plan
- [ ] Run Dashboard Variables tests locally with `npx playwright test
--grep "Dashboard Variables"`
- [ ] Verify all 69 tests pass in parallel execution mode
- [ ] Verify CI workflow runs correctly with consolidated shard


___

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


___

### **Description**
- Centralize dashboard selectors for E2E.

- Add safe wait helpers everywhere.

- Add dependency null-handling regression test.

- Improve page-object retries for stability.


___

### Diagram Walkthrough


```mermaid
flowchart LR
  specs["Dashboard variables specs"] 
  selectors["`dashboard-selectors.js` selector registry"]
  waits["Safe wait helpers"]
  pageobjs["Page objects retries"]
  ci["Playwright CI shard/workflow"]
  specs -- "replace raw selectors" --> selectors
  specs -- "replace waitForLoadState" --> waits
  waits -- "reduce flake in parallel" --> specs
  pageobjs -- "retry editor/inspector opens" --> specs
  specs -- "run reliably in CI" --> ci
```



<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><details><summary>8
files</summary><table>
<tr>

<td><strong>dashboard-variables-creation-scopes.spec.js</strong><dd><code>Adopt
centralized selectors and safe waits</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-878775b83972fb1f04f1d4df7bc0bbec364fbcbacda6fbd081423673e4ea4b05">+207/-201</a></td>

</tr>

<tr>

<td><strong>dashboard-variables-dependency.spec.js</strong><dd><code>Stabilize
dependency tests and add null-case</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-ad5a7685fbf4477a81657949b7dd4aa4ada6e66a4576d0c61bacb388095d0b52">+247/-123</a></td>

</tr>

<tr>

<td><strong>dashboard-variables-tab-level.spec.js</strong><dd><code>Refactor
spec to shared selectors/waits</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-b1f20469fa2e12dc68ede8ae381f60e2717489947ca693dd8a519fc03f195d48">+150/-148</a></td>

</tr>

<tr>

<td><strong>dashboard-variables-panel-level.spec.js</strong><dd><code>Refactor
spec to shared selectors/waits</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-a4f3068a8d69478dafa0bc1bfb7f51cf98a6980ecc62ae78ba46a617f8e227fd">+129/-120</a></td>

</tr>

<tr>

<td><strong>dashboard-variables-url-sync.spec.js</strong><dd><code>Refactor
spec to shared selectors/waits</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-709abba02dfd42b1be6d3838b162b544a2b97ba204dd179c37d462f0921ff14b">+126/-182</a></td>

</tr>

<tr>

<td><strong>dashboard-variables-refresh.spec.js</strong><dd><code>Refactor
spec to shared selectors/waits</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-8e82d40d2eda995a2915569d16456a9fd7d605017ed5868a28ee409e53646027">+130/-141</a></td>

</tr>

<tr>
<td><strong>dashboard-variables-global.spec.js</strong><dd><code>Remove
redundancy and stabilize global flows</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-f3750bde6fb0d471ec65d81b9d5a5a5b15d79ca900782959a0ff856a5156f5be">+106/-219</a></td>

</tr>

<tr>
<td><strong>dashboard-variables-setting.spec.js</strong><dd><code>Align
settings tests with new POM</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></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-1c6dd312b59d03b6cef1e15784451e5a5ffb3ed4682dec017e9834de8094fbdd">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Enhancement</strong></td><td><details><summary>8
files</summary><table>
<tr>
<td><strong>dashboard-selectors.js</strong><dd><code>Add shared
dashboard selector registry</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-b7a318c5d62df2558c0afaa7b21dbaae415d2f43506209da80544992a0f0d19d">+283/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>dashboard-chart.js</strong><dd><code>Add panel editor
readiness waits</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; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-573a312576fce62d8e14f2bbb5f9b7d9a552d746304dce3d79862edddd24de76">+17/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>dashboard-panel-edit.js</strong><dd><code>Retry query
inspector open for flake</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-ea18ab21ebeaac575078abcbc4f986502578ec39e2c9cb86437c821d0dabc9b5">+16/-4</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>dashboard-variables-scoped.js</strong><dd><code>Add helper
waits and selector utilities</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-86abb9f90fabd982dedfdd9a21a052a47b6984edc7bd29a51ee104c8c473aec4">+366/-13</a></td>

</tr>

<tr>
<td><strong>dashboard-settings.js</strong><dd><code>Harden settings
open/close and variable tab</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-1a07f3f14dacb06180bc02437804d175886aeacda98f5b0ef507a274e5ddd485">+132/-32</a></td>

</tr>

<tr>
<td><strong>dashboard-create.js</strong><dd><code>Improve dashboard
creation waits for parallel</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-c3c5add2b934580a91a79bb580634b70e2376b0452113008a0911102db3863e2">+83/-11</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>wait-helpers.js</strong><dd><code>Add safe wait wrappers and
retries</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-fdf1e3fd5f38875694acd5e3f0a140ed89326ce8a2910f07b18d1004fd5d2165">+101/-4</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>dashCreation.js</strong><dd><code>Add setup/cleanup helpers
for dashboards</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-0f865c438e06691b660a9d4a2448c7c94e6f5172c6a0615eb2a905fa276db575">+91/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>playwright.yml</strong><dd><code>Consolidate dashboard
variable shards in CI</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-7afcd2d8f7b49bda74843f209eefb7b2da45f7e7803bf2e4bd636699b76aa2d3">+3/-24</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>package.json</strong><dd><code>Update UI-testing
scripts/dependencies for E2E</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-a41ba7975823b7b2dc071285391f835fbefd33bfffeb5aa2fba3ae15425cc64f">+7/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>1 files</summary><table>
<tr>
  <td><strong>dashboard-variables-null-handling.spec.js</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10393/files#diff-e42ab503059a687ceb4fa2edeed0888a47591e0a61680c10448eaf68b4e6bbd8">+0/-152</a>&nbsp;
</td>

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

</details>

___
2026-02-09 10:48:24 +05:30

29 lines
883 B
JSON

{
"name": "zincsearch",
"version": "1.0.0",
"description": "zincsearchautomationtest",
"main": "index.js",
"scripts": {
"test": "npx playwright test",
"test:poc": "npx playwright test --config=playwright-poc.config.js",
"test:poc:headed": "npx playwright test --config=playwright-poc.config.js --headed",
"test:poc:debug": "DEBUG=pw:api npx playwright test --config=playwright-poc.config.js",
"report": "npx playwright show-report playwright-results/poc-html-report"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@playwright/test": "1.50.0",
"@types/node": "^20.12.2",
"dotenv": "^17.2.1"
},
"dependencies": {
"@google-cloud/local-auth": "^2.1.0",
"date-fns": "^3.6.0",
"date-fns-tz": "^3.1.3",
"googleapis": "^105.0.0",
"pixelmatch": "^5.3.0",
"pngjs": "^7.0.0",
"winston": "^3.11.0"
}
}