mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-05 08:09:22 +00:00
### **User description**
…ith limit
___
### **PR Type**
Tests, Enhancement
___
### **Description**
- Add JSON download verification helpers
- Consolidate downloads into one comprehensive test
- Cover CSV and JSON for custom ranges
- Add SQL mode CSV/JSON with LIMIT 2000
___
### Diagram Walkthrough
```mermaid
flowchart LR
LogsPage["LogsPage: add JSON verifiers"] -- used by --> Spec["logsDownloads.spec: comprehensive tests"]
Spec -- normal downloads --> CSV["CSV verification"]
Spec -- normal downloads --> JSON["JSON verification"]
Spec -- custom ranges (100-10000) --> CSV
Spec -- custom ranges (100-10000) --> JSON
Spec -- SQL mode LIMIT 2000 --> CSV
Spec -- SQL mode LIMIT 2000 --> JSON
```
<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>logsPage.js</strong><dd><code>Add JSON download
verification helpers</code>
</dd></summary>
<hr>
tests/ui-testing/pages/logsPages/logsPage.js
<ul><li>Add verifyJsonDownload helper for generic JSON<br> <li> Add
verifyJsonDownloadWithCount with expected count<br> <li> Validate file
presence, size, JSON structure, _timestamp<br> <li> Return saved
download path for reuse</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8543/files#diff-8045b343491d8943869c1af74cdafab204dc49c02a70294417e73f47d35e0b59">+76/-0</a>
</td>
</tr>
<tr>
<td>
<details>
<summary><strong>logsDownloads.spec.js</strong><dd><code>Consolidate and
expand logs download tests</code>
</dd></summary>
<hr>
tests/ui-testing/playwright-tests/Logs/logsDownloads.spec.js
<ul><li>Replace multiple tests with one orchestrated suite<br> <li> Add
helpers to setup page and SQL mode<br> <li> Test CSV/JSON for normal,
custom ranges, SQL LIMIT<br> <li> Aggregate results with robust error
handling and summary</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8543/files#diff-90f04cfe53caddf683cc4466e9e97af96d7eb90d636bf6b0f5cdc4b76dc395ac">+198/-204</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