Files
openobserve/tests/ui-testing
Shrinath RaoandClaude Opus 4.8 9842922521 test(pipelines): fix addPipeline mount-wait flake (isVisible timeout is a no-op) (#13420)
## What flaked

`Pipelines-Regression` → *"should validate scheduled pipeline SQL query
with metrics stream type"* (`pipeline-regression.spec.js:73`) timed out
in the ENT gate waiting for the editor mount signal
`[data-test="pipeline-node-sidebar-collapse-btn"]` (15s, all retries).

It's a **load-timing flake, not a real break**: OSS CI ([run
30005672782](https://github.com/openobserve/openobserve/actions/runs/30005672782))
and the ENT `main` baseline ([run
30005554375](https://github.com/openobserve/o2-enterprise/actions/runs/30005554375))
both pass this same test.

## Root cause

`addPipeline()` meant to poll for the mount signal across 3 attempts of
15s (re-clicking the add button non-destructively if the click was
dropped before navigation):
```js
for (let attempt = 1; attempt <= 3; attempt++) {
    if (await railToggle.isVisible({ timeout: 15000 }).catch(() => false)) break;
    ...
}
await railToggle.waitFor({ state: 'visible', timeout: 15000 });
```
But **`locator.isVisible({ timeout })` does not wait** — it returns the
current state immediately and ignores `timeout` (Playwright 1.50). So
the loop spun through instantly and the editor effectively got only the
**final 15s** `waitFor` to mount. Under concurrent cloud load VueFlow's
mount lags past 15s → timeout.

## Fix (page-object only)

Make each poll attempt actually block using `waitFor({ state: 'visible'
})` inside the loop (try/catch, re-click on the list page between
attempts), restoring the intended **~45s** of resilience before the
final assert.

## Verification

Local verification is currently blocked by a stale local build (the
selector was added in #13397 and isn't in the local `web/dist`), so this
is gated on a fresh CI regression run against the branch. The change
only lengthens the effective mount wait; it can't regress the happy path
(which already passes on fresh builds).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:50:21 +00:00
..
2024-11-13 15:13:36 +05:30

zinc-observe-ui-automation

Playwright UI Testing

Installation

npm install

Running Tests

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:

  1. Playwright Runner UI - Set environment variables through the web interface
  2. Environment Variables - Set variables in terminal or .env file