Files
openobserve/tests/ui-testing/playwright-tests/utils
Neha PandClaude 24b024a502 test: automation for bugs fixes (#9678)
### **User description**
## Summary
Refactored the logs regression test suite to follow the Page Object
Model (POM) pattern by centralizing all locators in the logsPage.js POM
file and updating test files to use these locators instead of hardcoded
selectors.


## Testing
All 10 regression tests passing:
- ✅ Absolute time error validation
- ✅ Stream switching with saved views (#9388)
- ✅ Field values with SUBQUERY/CTE/GROUP BY (#7751)
- ✅ Pagination count after search (#8868)
- ✅ Alert graph color display (#9311)
- ✅ Histogram query from history (#8180)
- ✅ Timestamp field in quick mode (#8180)
- ✅ Source field display logic (#8180)

Test execution: 10/10 passed in 7.2 minutes


___

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


___

### **Description**
- Refactor logs regression tests to Page Object Model
  - Centralize all locators in `logsPage.js`

- Add new POM locators for regression tests

- Add regression tests for bug #7751 (subquery, CTE, GROUP BY)

- Add regression tests for bug #8868 (pagination count update)

- Add regression test for bug #9311 (alert graph color)

- Add regression tests for bug #8180 (histogram, timestamp, source
field)


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["logsPage.js: New POM locators"] --> B["logs-regression.spec.js: Bug regression tests"]
```



<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>logsPage.js</strong><dd><code>Add POM locators for
regression tests</code>&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/logsPages/logsPage.js

<ul><li>Added alert-related selectors (<code>alertsMenuItem</code>,
<code>alertGraph</code>, <code>alertChart</code>)<br> <li> Added query
history selectors (<code>queryHistoryButton</code>,
<code>historyPanel</code>)<br> <li> Added table and pagination selectors
(<code>tableBottom</code>, <code>tableBodyRow</code>,
<br><code>tableHeaders</code>)<br> <li> Added dynamic field selector
functions (<code>fieldExpandButton</code>,
<br><code>subfieldAddButton</code>, etc.)<br> <li> Added streams search,
error indicators, timestamp detail selectors</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9678/files#diff-8045b343491d8943869c1af74cdafab204dc49c02a70294417e73f47d35e0b59">+29/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>logs-regression.spec.js</strong><dd><code>Add
regression tests for major log search bugs</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright-tests/RegressionSet/logs-regression.spec.js

<ul><li>Added tests for bug #7751: subquery, CTE, GROUP BY field
expansion<br> <li> Added test for bug #8868: pagination count after
filtering<br> <li> Added test for bug #9311: full alert graph color
rendering<br> <li> Added tests for bug #8180: histogram query, timestamp
in quick mode, <br>source field logic</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9678/files#diff-99da86ede55fa5f2e3d3fbef897ba7aaa5a7db702a0135f66ac4c888fc7311b6">+538/-0</a>&nbsp;
</td>

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

</details>

___

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-19 16:11:51 +05:30
..