Files
openobserve/tests/ui-testing
Vamsi Karthik RandClaude Opus 4.8 ba57f76e9d test(e2e): stabilize alpha1 Traces & Pipelines shards (error-toggle data seeding + flyout-nav / loading-button / indexing races) (#13246)
## What

Stabilizes the **Traces** and **Pipelines** shards of the alpha1 cloud
E2E suite
(`playwright_alpha1.yml`) to green. Rebased on `main` — builds on
#13191's
protocol-aware ingestion agent (`selectAgent`), so no duplicate
transport fix here.

The failing run had 1 hard failure + 1 flake in Traces and 7 failures +
1 flake in
Pipelines. Root causes: a data dependency (error traces not guaranteed),
hover-flyout
navigation force-clicks that miss, a refresh button disabled while
loading, and logs
indexing latency. All fixed with deterministic data/waits — no
`waitForTimeout` as a
fix, no `force:true`, no retry-count bumps, no weakened assertions.

## Root cause & fixes

**Traces**

1. **`tracesAnalyzeDimensions` "P0: Error-only toggle filters trace
results"** (hard fail,
both attempts). The error-only toggle is the error-count badge in
`SearchResult.vue`,
rendered `v-if="errorCount != null && errorCount > 0"` — it exists only
when the search
returns an error span. The shared `default` trace stream has no
guaranteed error traces
(global-setup ingests only logs), so the badge was present or absent by
luck of the
window (hence the intermittent CI greens). Fix: `beforeAll` seeds
guaranteed error
traces via a new `ingestTraces(page, n, { forceScenario: 'error' })`
option in
`trace-ingestion.js`, and `tracesPage.waitForErrorBadgeAfterSearch()`
re-runs the search
until the seeded errors are indexed — a bounded wait for backend
processing, not a sleep.

2. **`traceQueryEditor` "P2: View error spans and their details"**
(flaky). `clickFirstErrorTrace()`
used a blind `waitForTimeout(2000)` that raced the trace-details render
before the test
   asserted on it. Now waits for `trace-details-tree` to be visible.

**Pipelines** (`pipelinesPage.js`)

3. **`pipeline-section-tab-streamPipelines` 45s timeout** (5 tests:
`pipeline-core:56/159/238`,
`pipelines:479`, `pipeline-conditions:297`). `openPipelineMenu()` /
`navigateToStreams()`
navigate via `openNavFlyoutChild`, which hovers a nav group tile and
force-clicks the
teleported flyout child. The flyout self-closes on settle, so the click
can miss and the
page never navigates — the follow-up tab/refresh click then dead-waits
the 45s action
timeout. Both now verify the target page rendered (`pipeline-list-page`
/ `log-stream-table`)
and fall back to a direct `page.goto()` of the route otherwise. (A
failure screenshot showed
   exactly this: the Data flyout open over a blank page.)

4. **`log-stream-refresh-stats-btn` 45s timeout** (3 tests:
`pipeline-dynamic:72/97/113`). The
refresh button is an `OButton` with `:loading` bound to the stream-stats
fetch, and `OButton`
renders `:disabled="disabled || loading"`. Clicking during the (slow, on
loaded alpha) stats
load waited on actionability until timeout. `refreshStreamStats()` now
waits `toBeEnabled()`
before clicking; `navigateToStreams()` waits for the table instead of a
blind 1s.

5. **`openTimestampMenu` empty-table dead-wait.** After exploring the
destination stream, a bare
`.click()` on the first logs row timed out 45s when the freshly-ingested
rows weren't indexed
yet (high indexing latency on loaded envs) — a latent flake exposed once
fix 3 let the test
reach this step. Now re-runs the logs query until a row appears, then
clicks.

## Validation

- **CI — both shards green (workers=3, alpha cloud):**
  https://github.com/openobserve/o2-enterprise/actions/runs/29563931877
  (`alpha1-e2e / Traces` ✅ · `alpha1-e2e / Pipelines` ✅)
- **Original failing run:**
https://github.com/openobserve/o2-enterprise/actions/runs/29481437880
- **Local (alpha, CI conditions):** each previously-failing test re-run
to green —
Traces error-toggle & error-spans; `pipeline-core:56/159/238`;
`pipeline-dynamic:72`.

## Notes

- Only 4 files change (`pipelinesPage.js`, `tracesPage.js`,
`tracesAnalyzeDimensions.spec.js`,
`trace-ingestion.js`). The https-ingestion agent fix these depend on
already landed on `main`
  in #13191 — this branch relies on it rather than re-adding it.

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

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 05:53:11 +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