mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
### **PR Type**
Tests, Enhancement
___
### **Description**
- Add transpose custom SQL dashboard test
- Extend error checking return structure
- Validate no errors post-transpose
- Optimize test flow and assertions
___
### Diagram Walkthrough
```mermaid
flowchart LR
Tests["Dashboards transpose test"] -- "enable transpose via config" --> Transpose["Apply transpose"]
Transpose -- "check errors" --> ErrorCheck["Enhanced error results"]
ErrorCheck -- "assert zero errors" --> Save["Save panel and cleanup"]
```
<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>visualise.js</strong><dd><code>Enrich dashboard error
check return payload</code>
</dd></summary>
<hr>
tests/ui-testing/pages/dashboardPages/visualise.js
<ul><li>Extend error result object.<br> <li> Include
<code>errorTextCount</code> and <code>errorListCount</code>.<br> <li>
Preserve existing no-error logic.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8570/files#diff-c14ac1db3e4aa86190d7525e8e38c410bcbbae7f46b01890e74937cc11be67e6">+2/-2</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>dashboard-transpose.spec.js</strong><dd><code>New E2E
test: transpose with custom SQL</code>
</dd></summary>
<hr>
tests/ui-testing/playwright-tests/dashboards/dashboard-transpose.spec.js
<ul><li>Add test for transpose with custom SQL.<br> <li> Configure
fields, time range, and transpose.<br> <li> Use enhanced error counts
for assertions.<br> <li> Save and cleanup created dashboard.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8570/files#diff-da631007cea76a4bc59e4acd1195b59ae4131cd5208d21a9c1f94d3913911dc4">+88/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
zinc-observe-ui-automation
Playwright UI Testing
Installation
npm install
Running Tests
Using Playwright Runner UI (Recommended)
cd playwright-runner
npm start
Then open http://localhost:3000 to access the test runner interface.
Using Command Line
# Run all tests
npx playwright test
# Run specific test by tag
npx playwright test -g @alertsImportExport
# Run in headed mode
npx playwright test --headed
# Run specific test file
npx playwright test Alerts/alerts-import.spec.js
Environment Configuration
Tests can be configured using:
- Playwright Runner UI - Set environment variables through the web interface
- Environment Variables - Set variables in terminal or .env file