mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-06 00:09:22 +00:00
### **User description**
## Summary
- Fix join test failing due to stream not found in dropdown within
timeout
- Update `selectIndexAndStreamJoinUnion` method to use search filtering
## Problem
The test was timing out waiting for stream toggle element because the
dropdown had many streams and the target stream wasn't visible without
scrolling or filtering.
**Error:**
```
TimeoutError: locator.waitFor: Timeout 15000ms exceeded.
waiting for locator('[data-test="log-search-index-list-stream-toggle-e2e_join_a_mjs5hqbr"] div')
```
## Solution
Updated `selectIndexAndStreamJoinUnion` to use the search input box to
filter streams before selection (matching the robust pattern used by
`selectStream` method):
- Use search input to filter for each stream
- Clear and re-filter search for second stream
- Increased timeout from 15s to 20s
- Added explicit wait for dropdown arrow visibility
## Test Results
- ✅ Test passes in 47.7s
___
### **PR Type**
Bug fix, Tests
___
### **Description**
- Added explicit wait for dropdown arrow visibility
- Implemented search input filtering for stream selection
- Increased toggle wait timeout from 15s to 20s
- Refactored dropdown reuse for closing action
___
### Diagram Walkthrough
```mermaid
flowchart LR
Navigate["Go to logs page"]
OpenDropdown["Wait and click dropdown arrow"]
SearchFilterA["Filter for stream A"]
SelectA["Wait and click stream A toggle"]
ClearFilter["Clear and filter for stream B"]
SelectB["Wait and click stream B toggle"]
CloseDropdown["Click dropdown arrow to close"]
Navigate --> OpenDropdown
OpenDropdown --> SearchFilterA
SearchFilterA --> SelectA
SelectA --> ClearFilter
ClearFilter --> SelectB
SelectB --> CloseDropdown
```
<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>Enhance stream selection
with search filter</code>
</dd></summary>
<hr>
tests/ui-testing/pages/logsPages/logsPage.js
<ul><li>Added explicit wait for dropdown arrow visibility<br> <li>
Implemented search input filtering for stream selection<br> <li>
Increased toggles' wait timeout from 15s to 20s<br> <li> Refactored
dropdown toggling for open/close actions</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9802/files#diff-8045b343491d8943869c1af74cdafab204dc49c02a70294417e73f47d35e0b59">+29/-7</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___