Files
openobserve/tests/ui-testing/playwright-tests/Logs
Shrinath Rao 3fedd93430 test: Reworked logs download tests, added 10 tests for json and sql w… (#8543)
### **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>&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/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>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>logsDownloads.spec.js</strong><dd><code>Consolidate and
expand logs download tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</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>

___
2025-09-19 18:32:25 +05:30
..