Files
openobserve/tests
Shrinath Rao 746a43f162 test: add enrichment table cleanup patterns and fix search reliability (#9722)
### **User description**
## Summary

- **Add missing cleanup patterns** for enrichment tables in
`cleanup.spec.js` to prevent test data accumulation
- **Fix `searchEnrichmentTableInList` method** in `enrichmentPage.js` to
resolve timeout errors

## Changes

### 1. Enrichment Table Cleanup Patterns (`cleanup.spec.js`)

Added 5 new patterns to clean up test-generated enrichment tables:

| Pattern | Source Test |
|---------|-------------|
| `enrichment_info_<uuid>_csv` | "should upload an enrichment table
under functions" (line 53) |
| `append_<uuid>_csv` | "should append an enrichment table under
functions" (line 132) |
| `search_test_<uuid>_csv` | "should search and filter enrichment
tables" (line 174) |
| `edit_test_<uuid>_csv` | "should open edit mode with disabled name
field" (line 200) |
| `delete_test_<uuid>_csv` | "should show delete confirmation dialog
with cancel" (line 235) |

### 2. Search Reliability Fix (`enrichmentPage.js`)

Fixed `searchEnrichmentTableInList` method that was causing timeout
errors:

**Before:**
```
TimeoutError: locator.waitFor: Timeout 30000ms exceeded.
  - waiting for locator('[data-test="enrichment-tables-list-title"]') to be visible
```

**Fix:**
- Removed unreliable wait for
`[data-test="enrichment-tables-list-title"]` selector
- Wait directly for search input placeholder (more reliable page ready
indicator)
- Wait for actual filtered table row results instead of fixed timeout

## Test plan

- [ ] Run enrichment table e2e tests
- [ ] Verify cleanup removes leftover test tables


___

### **PR Type**
Tests, Bug fix


___

### **Description**
- Improve searchEnrichmentTableInList reliability
  - Wait for network idle and search input
  - Wait for filtered row visibility

- Add enrichment table cleanup patterns
  - enrichment_info, append, search_test
  - edit_test, delete_test


___



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>enrichmentPage.js</strong><dd><code>Enhance
searchEnrichmentTableInList reliability</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/pages/generalPages/enrichmentPage.js

<ul><li>Removed wait on
<code>[data-test="enrichment-tables-list-title"]</code><br> <li> Added
<code>waitForLoadState('networkidle')</code> calls<br> <li> Updated
search input wait and fill logic<br> <li> Added filtered table row
visibility wait</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9722/files#diff-98a7e60352ddf3be23cf70170559e637ef448c189cd9414448e9afff897c3019">+9/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>cleanup.spec.js</strong><dd><code>Add enrichment
cleanup patterns</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &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/playwright-tests/cleanup.spec.js

<ul><li>Added five enrichment table cleanup patterns<br> <li> Patterns
for <code>enrichment_info_<uuid>_csv</code><br> <li> Patterns for
<code>append_<uuid>_csv</code>, <code>search_test_<uuid>_csv</code><br>
<li> Patterns for <code>edit_test_<uuid>_csv</code>,
<code>delete_test_<uuid>_csv</code></ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9722/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+6/-1</a>&nbsp;
&nbsp; &nbsp; </td>

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

</details>

___
2025-12-24 09:21:54 +05:30
..
2024-09-22 17:57:47 +08:00