Commit Graph
57 Commits
Author SHA1 Message Date
Shrinath Rao 2834186b8a test(e2e/alpha1): unique per-run alert destination/template so Add Alert button enables (#13783)
## Why

After #13776 merged, the alpha1 **RegressionSet** shard still failed —
but on a **new, different** cause than #13776 fixed. All 4
`alerts-regression` tests died at the very first step
(`clickAddAlertButton`) because the button was **disabled**:

```
<button disabled aria-disabled="true"
        title="No destinations available"
        data-test="alert-list-add-alert-btn">
19 × locator resolved to disabled  → toBeEnabled() timed out after 15s
```

## Root cause (reproduced live on the RegressionSet org, auto_org_2)

[`AlertList.vue`](web/src/components/alerts/AlertList.vue#L51) disables
the Add Alert button while `destinations.length === 0`:
```vue
:disabled="!destinations.length || !templates.length"
:title="!destinations.length ? t('alerts.noDestinations') : ''"
```

On the **shared** cloud org the **fixed** names `e2e_promql_dest` /
`e2e_promql_template` were stuck ghost records — a concurrent run's
cleanup couldn't fully delete them (UI delete timed out /
`destinations_templates_fk` 500). So the beforeAll create returned `400
"already exists"`, yet the destinations list loaded **empty**, keeping
the button disabled through the 15s `toBeEnabled` wait. Not a product
regression — the org simply had no *loadable* destination.

This is the same **shared-org fixed-name collision** class fixed for
streams in #13776.

## Fix

- `e2e_promql_dest` / `e2e_promql_template` → `..._<RUN_TOKEN>` (unique
per run), so the beforeAll always creates a real, loadable destination.
Keeps the `e2e_promql_` prefix so `cleanup.spec.js` still reclaims them.
- Gate the beforeAll on the destination actually appearing in the
`/alerts/destinations` list API before tests run, so the button is
reliably enabled (`destinations.length > 0`) instead of racing the
fetch.

## Verification (alpha, RegressionSet org auto_org_2 — reproduced 100%
before)

- Before: `Add Alert` disabled → `toBeEnabled` 15s timeout → 4/4 fail.
- After: `Destination confirmed in list API | e2e_promql_dest_<token>` →
button enabled → **alerts-regression 5/5 pass** (#9967, #10899, #10872,
#10110, #10472); alerts saved for both `>=` and `<=`.

## Scope
OSS-only test file. Picked up by the ENT alpha1 workflow the same way as
#13776 (checks out opensource `main`, or dispatch with
`o2_opensource_repo=test/alerts-regression-destinations-gate`).
2026-08-12 11:57:01 +00:00
Shrinath Rao 6650950a50 test(e2e/alpha1): fix share-link redirect origin and cloud metrics ingest auth (#13776)
## Why

The scheduled **Alpha1 (Cloud)** e2e run failed on three jobs
([o2-enterprise run
31547517666](https://github.com/openobserve/o2-enterprise/actions/runs/31547517666)):
**Logs-Features** (7), **Functions** (11), **RegressionSet** (4).
Root-caused each against a freshly-deployed alpha; two are genuine test
heals, one was pure environment skew.

## Root causes & fixes

### 1. Logs-Features — shareLink + monaco-query-prefill (7 tests) ✅
fixed
On cloud the app builds the share link from its **public** base URL
(`*.external.zinclabs.dev`), while the tests authenticate against the
ingress host (`*.internal.zinclabs.dev`). `page.goto(sharedUrl)`
navigated **cross-origin**, dropped the auth cookies, and bounced to Dex
— so every post-redirect state assertion read back `null`.

**Fix:** re-point the short URL's origin to `ZO_BASE_URL` in
`clickShareLinkAndGetUrl()` (right next to the existing HTTP→HTTPS
"maintain auth context" step). `/short/<id>` resolves identically on the
backend regardless of ingress host, so only the origin changes and the
session stays valid. Same-origin envs (localhost / matching deployed
host) are untouched.

### 2. RegressionSet — alerts Bug #9967 PromQL (1 test) ✅ fixed
`ingestMetricsData()` authenticated with `ZO_ROOT_USER_EMAIL:PASSWORD`,
but **cloud ingestion needs `email:passcode`**. The ingest silently
401'd → the `e2e_test_cpu_usage` metrics stream was never created → the
PromQL alert flow timed out selecting it.

**Fix:** build auth via `getAuthHeaders()` (passcode on cloud, root
creds on self-hosted), refresh the passcode from the live browser
session first, and poll until the stream is indexed so the wizard's
stream-select doesn't race WAL lag.

### 3. Functions — radio → segmented toggle (11 tests) — no change
needed
The page object was already migrated to the segmented toggle in #13766;
these failures were the **alpha frontend lagging the merged test code**.
Green after the redeploy with zero code change.

## Verification (against alpha, `auto_org_1`)
- `shareLink.spec.js` + `monaco-query-prefill.spec.js` → **11/11
passed**
- `alerts-regression.spec.js` (full) → **5/5 passed** (#9967, #10110,
#10899, #10872, #10472)
- `Functions/js-transform-type.spec.js` → **7/7**,
`row-expansion.spec.js` → green

## Scope
OSS-only (test files). The ENT `playwright_alpha1.yml` checks out
opensource at `main`, so merging makes the next scheduled run pick this
up. It can also be pre-verified by dispatching that workflow with
`o2_opensource_repo=test/alpha1-e2e-heals-0812`.
2026-08-12 06:35:48 +00:00
Shrinath Rao cb78ef36fd test(sentinel): complete POM compliance — Dashboards + Correlation (follow-up to #13727) (#13735)
## Summary

Completes the Sentinel **Page Object Model** compliance sweep of the
Playwright suite (follow-up to #13727, which covered the non-Dashboards
shards). Every raw `page.locator(...)` / `page.getBy*(...)` selector —
in **actions and assertions** — is relocated out of the spec files into
the relevant page object; specs now call page-object methods/getters
only.

**Result: 0 raw fixture-`page` selectors across the entire
`playwright-tests` suite** (single-line *and* multi-line, verified with
a dotall/multiline scanner). Together with #13727, the whole suite is
POM-clean.

## What's in this PR

**Dashboards shards — ~1,460 selectors** relocated into their page
objects (`dashboard-panel-configs/actions/edit/time`, `dashboard-chart`,
`dashboard-variables-scoped`, `dashboard-filter`, `dashboard-drilldown`,
`crossLinkPage`, `visualise`, `dashboard-share-export`,
`dashboard-create`, `dashboard-settings`, `dashboard-variables`):

| Shard | selectors |
|-------|----------:|
| Dashboard-Config-Settings (11 specs) | ~255 |
| Dashboards-Variables (12 specs, 4 batches) | ~693 |
| Dashboards-Tables (7 specs) | ~127 |
| Dashboards-Charts (9 specs) | ~81 |
| Dashboards-Core + Visualize (10 specs) | ~144 |
| Dashboards-Settings + Panel-DateTime (8 specs) | ~107 |
| Dashboard-Regression (1 spec) | ~52 |

**Correlation UI specs** (3 new `Correlation/*.ui.spec.js` that arrived
via main's merge, after the original audit) — converted into a new
`correlationDrawerPage` + an extended `correlationSettingsPage`, with
`PageManager` wired into specs that previously used none.

**Audit stragglers** the original **single-line** audit grep
undercounted — multi-line `page\n.locator(...)` chains in
`logstable.spec.js` (→ `logsPage.getTableHeaderByField()`) and
`dashboard-streaming.spec.js` (2 add-panel selectors).

**AI-review fixes** (DeepSeek, on this PR) — removed 2 dead-code
duplicate getters + 1 redundant method alias (merge artifacts from the
sequential batch commits).

One Node-context `console.log` (`dashboard-general-setting`'s
`beforeEach`) → `testLogger.info`.

## Approach

Nearly every Dashboards spec shares the same page objects, so the work
was done in **sequential batches** (one committed, verified unit at a
time) to keep page-object edits conflict-free. 13 commits, mapping 1:1
to those batches.

## Not changed (by design)

- **`waitForTimeout`** left as-is — logged in the audit, not rewritten
(per direction).
- **Browser-context code inside `page.evaluate()` /
`waitForFunction()`** (`document.querySelector`, `window.*`) left as-is
— it runs in the page's JS engine, not Node, so `testLogger` (a Node
module) can't be called there. *No `console.*` remained in dashboards
specs*; the Node-context ones were converted to `testLogger`.
- **`newPage.locator(...)`** on separate popup `Page` instances left
as-is (not the fixture `page`).

## Verification

- **0 raw fixture-`page` selectors** across all specs — single- and
multi-line, comments stripped.
- All changed `.js` files pass `node --check`.
- **CI-gated** for browser execution (no local runs), consistent with
#13727. The enterprise E2E crosscheck already passed against this PR.

## Stats

82 files changed (+3,355 / −2,211) — 61 specs, 21 page objects.
Selectors **moved into page objects, not deleted**.
2026-08-11 06:09:06 +00:00
Shrinath Rao 82d14e8458 test(sentinel): POM compliance across Playwright suite (non-Dashboards) (#13727)
## What & why

Sentinel (Council of Agents) audit-driven **Page Object Model
compliance** across the Playwright suite. Many specs (a lot added
recently, some AI-generated) had raw `page.locator(...)` /
`page.getBy*(...)` selectors directly in spec files — including inside
`expect(...)` — which the Sentinel flags as CRITICAL. This PR relocates
those selectors into their page objects and calls page-object
methods/getters instead.

A full audit of **all 256 specs** was generated first (stored locally
under `tests/ui-testing/MD_Files/sentinel-audit-2026-08-10/`, which is
gitignored). Original totals: **1,609** raw selectors, **190** inside
assertions, plus console/testLogger items.

## Scope of THIS PR (non-Dashboards)

Every non-Dashboards spec is now **100% raw-selector clean** (verified:
0 occurrences). Shards covered:

- **GeneralTests, Logs (Core/Builder-Advanced/Features/Regression),
Traces (+Reg), Streams (+Reg), Metrics (+Reg), Pipelines, Reports
(+Reg), Anomaly, Login/auth, auth-warm, and the unmatched Alerts
specs.**
- `console.*` → `testLogger` where it was Node-context (kept `console.*`
**inside `page.evaluate()`** — that's browser context; `testLogger`
doesn't exist there).
- `testLogger` import/use added where missing.
- **`waitForTimeout` intentionally left as-is** (logged in the audit,
not rewritten — per direction).

## Deferred to a follow-up PR

The **heavy Dashboards shards** (Variables 693, Config-Settings 255,
Tables 127, Charts 81, Core 79, Visualize 65, Settings 52,
Panel-DateTime 55, Dashboard-Regression 52 raw selectors) are **not** in
this PR — they're the bulk of the work and will be a separate, focused
pass. (dashboard-streaming console cleanup is included here.)

## Verification

Fixes were applied and executed **shard by shard** against a local env,
gated green before commit where the env allowed:

| Group | Local result |
|-------|--------------|
| GeneralTests (edited specs) | 52 passed / 11 skipped / 0 failed |
| Logs (shareLink, logsQuickPick, indexquery) | 21 passed |
| Traces / Streams / Metrics | 49 passed / 2 skipped / 0 failed |
| Pipelines | 56 passed / 17 skipped / 0 failed |
| logs-bugs :548, dashboard-streaming | verified not regressed
(isolation) |

**Alerts create-wizard specs** (Alerts shard, Alerts-Regression,
unmatched Alerts) could not be gated locally — the alert-creation
wizard's stream popover times out on this env **on unmodified code too**
(reproduced on original, test `:363`), so those refactors are 1:1
selector→method mappings, syntax-clean (`node --check`), and rely on CI
to gate.

Every changed `.js` passes `node --check`. `waitForTimeout` unchanged;
no behavior changes intended.

## Stats
51 files changed. Selectors moved into page objects, not deleted.
2026-08-10 15:30:21 +00:00
Shrinath Rao 7ab93c04d5 test(reports): heal reports-regression timezone spec (edit-prefill race + toast selector) (#13724)
## What

Heals the Reports regression spec `reports-regression-bugs.spec.js` →
*"Report save should not shift timestamp by timezone offset"*
(@bug-11231), which was failing deterministically (all 4 retries) in
both the OSS and ENT **Playwright Regression** runs:

- OSS:
https://github.com/openobserve/openobserve/actions/runs/31364820545
- ENT:
https://github.com/openobserve/o2-enterprise/actions/runs/31364817885

This is **test-only** — the product is unaffected (the historical #11231
fix and normal report save both work; a save actually succeeds in the
failing run).

## Root cause (two independent defects)

1. **Wrong success-toast selector (deterministic line-118 failure).**
The save assertion used `page.getByRole('alert')`. `OToast` renders the
**success** variant with `role="status"` — only **error/warning** toasts
get `role="alert"`
([`OToast.vue`](https://github.com/openobserve/openobserve/blob/main/web/src/lib/feedback/Toast/OToast.vue)
`rootRole`). So the assertion could never match a successful save and
timed out. → now asserts on the success toast
`[data-test-variant="success"]`, consistent with the rest of the file.

2. **Edit-prefill race (line-84 failure, the one captured in the
trace).** On the edit flow, step-1 `Continue` could fire before the
async edit prefill (`form.reset()` after the report GET) populated
folder/dashboard/tabs. `goToStep()` then failed validation and silently
stayed on step 1, so the schedule toggle never rendered and the test
timed out looking for it. → `createReportContinueButtonStep1()` now
retries the click until the schedule step is actually reached,
**keeping** the original post-advance settle so downstream step-2
interactions (schedule-later toggle, step-2 Continue) don't race.

Also dedups the spec's inline date/time entry through the existing
`createReportDateTime()` helper (logic unchanged).

## Verification (local, `localhost:5080`)

| Suite | Result |
|---|---|
| `reports-regression-bugs.spec.js` (target) | ✅ stable across repeated
runs (1 + 3× repeat-each) |
| `reportsScheduleLater.spec.js` | ✅ 6/6 |
| `reportsScheduleNow.spec.js` + `reportCsvMediaType.spec.js` | ✅ 13/13
|

The two changed page-object methods are shared with the sibling Reports
specs above; all pass, confirming no regression.

## Scope

The spec lives in OSS `tests/` and is tree-merged into the ENT
regression run, so this single OSS change fixes both pipelines. No ENT
repo change required; the ENT regression will be re-triggered against
this branch.
2026-08-10 11:27:25 +00:00
Prabhat Sharma 087e1498ab feat(slos): add SLO burn-rate alerts (#13704)
design at /slo

## What

Adds **SLO burn-rate alerts** — an alert family that fires off an SLO's
error budget rather than a raw query — and finishes the SLO surface
around it: navigation entry, detail-page fixes, and the flag removal now
that SLOs have shipped.

## Changes

**SLO burn-rate alerts (backend)**
- New burn-rate evaluation (`config/src/meta/slo/burn.rs`,
`condition.rs`) with multi-window burn conditions, and
`core/src/slo/evaluate.rs` extended to evaluate them on the SLO job.
- Alerts carry an `slo_id`; `infra/src/table/alerts` gains the column,
filtering, and query support so an SLO's alerts can be listed and
deleted with it.
- Alert levels (`meta/alerts/level.rs`) and tags extended for the SLO
family; scheduler handlers route SLO alerts through the same
notification path.

**SLO alert UI**
- `SloAlertForm` + `AlertDetailSlo`: create, edit and view burn-rate
alerts from the SLO detail page and the alert list.
- Payload/routing helpers (`utils/alerts/sloAlertPayload.ts`,
`sloAlertRouting.ts`, `alertPayload.ts`) with unit tests.
- `AlertDestinationsField` extracted as the complete Destination form
field — side label, tooltip, combined destinations/workflows picker,
inline error, refresh, and create-in-new-tab. It replaces two verbatim
copies in the generic alert form and is reused by the SLO form and
synthetics `CheckAlerts` (which sets `supportsWorkflows: false`, since a
check has no workflow routing). Fixes the SLO form's previously unwired
refresh and Add Destination buttons.

**SLO detail page fixes**
- Burndown and burn-rate charts drew as bare axes when coverage was
sparse: `showSymbol: false` means an isolated measured bucket between
gaps has no segment and paints nothing. Symbols are now sized per point,
and a sparse-coverage note states how many buckets actually recorded
events.
- Nothing scrolled below ~700px of viewport height — `OPageLayout`'s
fixed flex body plus `OTabPanels` `scroll="none"` clipped the panels.
Panels now grow and scroll; the stat strip and tab bar stay pinned.
Verified at 1024x500, 1280x620, 1512x945.

**Other**
- `ZO_SLO_ENABLED` removed — SLOs have shipped, so the flag and its
status/route gating are gone.
- SLOs surfaced in the main nav.
- Dashboard chart panel header gets its own tint via new
`--color-panel-bar-bg` / `--color-panel-bar-border` tokens, and the bar
is extracted into `PanelBar.vue` (it existed as five hand-copied class
strings that had already drifted).
- `tsconfig.vitest.tsbuildinfo` untracked; third-party vendor name
removed from comments and test names.

## Testing

- New Rust tests across `meta/slo/burn.rs`, `condition.rs`,
`core/src/alerts/alert.rs` and `infra/src/table/alerts`.
- New frontend suites: `sloAlertPayload.spec.ts`,
`sloAlertRouting.spec.ts`, `alertPayload.spec.ts`,
`AlertDetailSlo.spec.ts`, `SloDetailAlerts.spec.ts`,
`SloListDelete.spec.ts`, `SloTimeSlicePreview.spec.ts`.
- `cargo clippy --all-targets` and `web` `lint:ci` clean.
2026-08-10 10:07:38 +00:00
Shrinath Rao 98e03bca15 test(e2e/alpha1): stabilize the alpha1 cloud suite — auth self-heal, infra, and per-test heals (#13626)
## Stabilize the Alpha1 (cloud) e2e suite + regression carryover

Root-caused and fixed the failures surfacing on the Alpha1 cloud runs —
investigated live via Playwright MCP against alpha and, where possible,
a local build. Grouped by theme. Every fix is non-masking (still fails
if the underlying is genuinely broken). Pairs with ENT #2351
(`max-parallel` + Logs-SelectStar `quick_mode`).

### Runtime / infra resilience (whole-suite)
- **Auth self-heal on 401 / session expiry** — the shared cloud session
+ per-org passcode are minted once and reused all run; on
load/contention they expire mid-run (`User not authenticated`, `HTTP 401
Unauthorized`). `cloud-auth.authedRequest` refreshes the passcode and
retries on 401 (escalating to a full Dex re-login if the session is
dead); `navigateToBase` re-authenticates and resumes instead of
throwing. Also routed the alert **template-creation** API through it
(401 there cascaded into "Failed to navigate to templates"). Gated on
`isCloudEnvironment()` — no self-hosted change.
- **`--disable-dev-shm-usage`** on the alpha1 Chromium launch — the EKS
pods used the default 64MB `/dev/shm`; under 5 workers on long/heavy
shards Chromium exhausted it and the pod OOM-killed → "runner lost
communication" (frozen step + 404 logs). Route shared memory to /tmp;
eliminates the infra deaths.
- **Service graph queries a wide window** (`period=6h`) — the tab
defaulted to Past 15 Minutes and rendered "No service graph data" before
the daemon-processed topology fell inside the window.

### Pipelines
- `queryStream(stream, expectedMinCount)` **polls until the record count
lands** (pipeline output arrives async) — was single-shot ("Expected 5,
got 3").
- `openPipelineForEdit` **searches + polls-with-reload** for the edit
button (list not refreshed after save → 45s click timeout).
- `exploreStreamAndNavigateToPipeline` **reloads the streams list**
while polling for Explore, and **falls back to a direct logs URL** when
a freshly-ingested source stream never surfaces in the list
(stream-stats lag).

### Alerts
- Alert-destination URL → **public `example.com` webhook** (self-host
URL hit the cloud **SSRF guard** → form never closed).
- **Force-click the virtualized folder item** (#9484) — the row
re-rendered mid-click → 45s "not stable".
- **Export button readiness** — it's rendered only on selection; wait
for visible+enabled (re-selecting if needed) before clicking.
- **`deleteAlertByRow` cleanup readiness** — the just-created alert's
more-options kebab needs longer than 5s under load.

### RegressionSet
- **Use the shard's org** (`getOrgIdentifier()`), not hardcoded
`org_identifier=default`, in `logs-bugs` — on cloud the data lives in
`auto_org_N`, so the logs page never rendered.
- **Unique stream names** for `logs-9754` / `logs-bugs:1419` — fixed
names collided with concurrent shared-org runs ("stream is being
deleted").

### Traces / correlation
- **Migrated `logs-bugs:995` (bug-11469)** to the redesigned correlation
UI — the old `log-correlation-btn` / `correlation-dashboard-close` are
gone; repointed to the inline `correlated-traces-tab`, assertion
(`expectNoContextMenuVisible`) unchanged and **verified live on alpha**
(no fake-pass).

### Workflows (ENT-only) + misc
- **Healed the workflows destination flow** and forced-type
Connection-step assertion; alert/report list-readiness hardening.
- **Enrichment tables list** readiness (30s + re-nav retry) — "slow
under load".

### Notes
- Validated live via MCP (alpha) and a local build where the feature
exists.
- Alpha1 config already runs `retries: 2`; the remaining first-attempt
flakes are shared-env load, addressed on the ENT side via
`max-parallel`.
2026-08-06 00:57:05 +00:00
Shrinath Rao de95f7f2d8 fix: restore Table default log-detail view (#13368) + heal alert-name inline-edit read (#13585)
## What & why

Two **Playwright Regression** nightly failures, reproduced identically
on both OSS ([run
30785096054](https://github.com/openobserve/openobserve/actions/runs/30785096054))
and ENT ([run
30785071382](https://github.com/openobserve/o2-enterprise/actions/runs/30785071382))
— same two shared-`tests/` specs, all 3 retries failed each. Both are
OSS-owned specs (ENT overlays only its own `tests/*` and builds OSS
`web/`), so this single OSS PR fixes both nightlies.

### 1. Logs — real product regression (`logs-regression.spec.js:1158`)
`Log detail sidebar opens with Table tab by default (#13368)` → `Error:
Table tab should be selected by default`.

**Root cause:**
[#13368](https://github.com/openobserve/openobserve/pull/13368) (Jul 23)
deliberately made the log-detail sidebar open on the **Table** tab.
[#13451](https://github.com/openobserve/openobserve/pull/13451) (Jul 30,
*"table migration to same components"*) silently flipped
`detailTableInitialTab` back to `"json"` in `SearchResult.vue` (both the
`ref` init and the per-open reset). The unchanged test correctly caught
the reverted behavior.

**Fix:** restore `"table"` as the default log-detail tab. Product fix —
no test change.

### 2. Alerts — stale test vs redesigned component
(`alerts-stream-switching.spec.js:443`)
`Bug #11577: Alert preview chart y-axis displays numeric values` →
`TimeoutError: locator.inputValue: Timeout 45000ms exceeded`.

**Root cause:** the alert name became an **`OInlineEdit`** title
(`OFormInlineEdit`, from the
[#13547](https://github.com/openobserve/openobserve/pull/13547) Alerts
revamp). In display mode the value lives in the `…-value` span; the
`…-input` only exists **while editing**. The test read `.inputValue()`
on the non-existent input → 45s timeout.

**Fix:** read the committed display value via a new `getAlertName()`
page-object helper (with an edit-mode `inputValue()` fallback).

## Verification
- **Alerts #11577** — ✅ passed locally against a local O2 build (`1
passed`); `getAlertName()` reads the name and the full
save/verify/delete flow works.
- **Logs #13368** — restores the exact `detailTableInitialTab = "table"`
value #13368 set and the unchanged test already validated as green.
Confirmed by this run's Logs-Regression job + the dispatched ENT e2e
gate.

## Scope
- `web/src/plugins/logs/SearchResult.vue` — 2 lines (product)
-
`tests/ui-testing/playwright-tests/RegressionSet/Alerts/alerts-stream-switching.spec.js`
— read display value
- `tests/ui-testing/pages/alertsPages/alertsPage.js` — `alertNameValue`
locator + `getAlertName()` helper
2026-08-03 07:19:28 +00:00
Shrinath RaoandClaude Opus 4.8 1daa36b0f8 fix(logs): preserve restored SQL query on shared-link open + align log-detail default-tab test (13368) (#13414)
> **This PR contains two independent logs changes:**
> **(A)** a product fix for the shared-link SQL-query restore race, and
> **(B)** the log-detail default-tab test alignment (original scope of
this PR).

---

# (A) fix(logs): preserve restored SQL query on shared-link open
(fullSQLMode watcher race)

## The bug
Opening a **shared link** to an SQL search **sometimes lands on an empty
query editor** ("SQL query is missing or invalid") instead of the shared
search. Intermittent, worse under load — it's the recurring
Logs-Features alpha flake (`monaco-query-prefill` P0 "query editor never
contained SELECT").

**Not the short-URL mechanism** — the short URL correctly carries
`sql_mode=true` + the base64 query. The loss happens in the browser
during restore.

## Root cause — a watcher race
`restoreUrlQueryParams()` raises `shouldIgnoreWatcher`, flips
`meta.sqlMode = true`, then writes the decoded query into the editor.
Flipping `sqlMode` fires the **`fullSQLMode`** watcher in `Index.vue`,
whose two branches were **asymmetric**:

- **switch OFF** branch → already checks `shouldIgnoreWatcher` ✅
- **switch ON** branch → **did not** ❌ — it called `setQuery()`,
rebuilding a *default* `SELECT … FROM stream` over the value the restore
was mid-writing.

Under load the watcher wins the race; the editor briefly empties, SQL
mode auto-detects back **off**, and the editor is cleared entirely.

## The fix
Make the "switch ON" branch honour `shouldIgnoreWatcher` too — symmetric
with "switch OFF". During any programmatic restore the watcher **stands
down** and the restored query is the last word. (`shouldIgnoreWatcher`
is raised only by programmatic-state paths whose purpose is to suppress
watcher side-effects, so honouring it here is consistent.)

## Verification (A)
- ✅ **New unit test**: with `shouldIgnoreWatcher` set, flipping
`sqlMode` ON does **not** call `setQuery`/`updateUrlQueryParams`, and
the restored `SELECT` query is preserved.
- ✅ Existing `fullSQLMode` watcher test still passes; full
`Index.spec.ts` green (**69 passed**).
- ✅ Reproduced the failure on **alpha under CI-load** beforehand
(share-link P0 flaky, "query editor never contained SELECT").
- ⚠️ The race is only observable against a **deployed** frontend (the
alpha e2e suite runs against alpha's frontend, not a local build), so
the final "flake gone on alpha under load" check requires this deployed
to alpha, then re-running the Logs-Features share-link tests.

Files: `web/src/plugins/logs/Index.vue`,
`web/src/plugins/logs/Index.spec.ts`.

---

# (B) test(logs): align log-detail default-tab test with Table default
(13368)

## What
Updates the log-detail sidebar default-tab regression test (originally
Bug #9724) to match the **intentionally shipped** behavior from [PR
#13368](https://github.com/openobserve/openobserve/pull/13368) — *"logs
sidebar table will be default view and draggable tabs"*.

## Why
#13368 changed the log-detail sidebar default from the **JSON** tab to
the **Table** tab (`SearchResult.vue` — `detailTableInitialTab.value =
"table"`). The Bug #9724 test still asserted JSON-as-default, so it
fails on `main`: the JSON tab's `data-state` stays `inactive` for the
full timeout across all retries, on both OSS and ENT Logs-Regression.
Not a flake and not a product bug — the test expectation was simply out
of date after a deliberate default-view change.

## Changes
- Rename test → **"Log detail sidebar opens with Table tab by default
(#13368)"**.
- Add `verifyTableTabSelectedByDefault()` page-object helper
(auto-retrying `toHaveAttribute('data-state','active')`); remove the
now-invalid `verifyJsonTabSelectedByDefault()`.
- Reorder switch steps: assert Table default (+ wrap toggle, which
renders only on the Table tab), switch to JSON and back to Table, reopen
and confirm Table default persists.

## Note on #13407
Supersedes the earlier heal
[#13407](https://github.com/openobserve/openobserve/pull/13407), which
misdiagnosed the failure as a `data-state` timing flake. A
locally-hosted stale pre-#13368 build had masked the change.

Files: `tests/ui-testing/pages/logsPages/logsPage.js`,
`tests/ui-testing/playwright-tests/RegressionSet/Logs/logs-regression.spec.js`.

```
npx playwright test playwright-tests/RegressionSet/Logs/logs-regression.spec.js \
  -g "Table tab by default" --project=chromium
```

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:35:24 +00:00
Shrinath RaoandClaude Opus 4.8 871b9b69b7 test(traces): heal bug #11531 spec for flame-graph-default trace detail (#13392)
## What

Heals the **Traces-Regression** failure on `main` (scheduled run
[29935986660](https://github.com/openobserve/openobserve/actions/runs/29935986660/job/88982390601)).

The Bug #11531 test in `traces-bugs.spec.js` (`traces spans tab should
not reference non-existent method field`) clicks a trace result and
immediately asserts the span tree via `expectTraceDetailsVisible()`,
which waits for `[data-test="trace-details-tree"]`.

## Why it started failing

PR 13347 (`fix: traces page default flame graph and drag-drop option
added`) changed the trace detail view to **open on the flame graph by
default** (`DEFAULT_TRACE_TAB = "flame-graph"`) instead of the
waterfall. The span tree lives inside `v-if="activeTab ===
'waterfall'"`, so it no longer renders on open — the assertion timed out
(15s) and the job exited 1.

This is **not a product bug** — it's an intentional product change.
13347 added a `openTraceDetailsTab()` helper and updated the other
traces specs, but this Bug #11531 test was missed.

## Fix

Select the waterfall tab explicitly before reading the tree, matching
the pattern 13347 already applied elsewhere:

```js
// Since 13347 the trace detail opens on the flame graph by default.
await pm.tracesPage.openTraceDetailsTab('waterfall');
await pm.tracesPage.expectTraceDetailsVisible();
```

Test-only change; no product code touched.

## Verification (local, hosted O2 @ localhost:5080, `default` traces
stream w/ data)

| State | Result |
|-------|--------|
| Before fix (unpatched) | ❌ `expectTraceDetailsVisible` times out at
`tracesPage.js:310` |
| After fix (patched) | ✅ `1 passed (22.3s)` — "Trace details visible"
logged |

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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 04:36:33 +00:00
f15e27e5fd refactor: design token migration + CI guards (#13173)
# Design System Unification — one visual language, enforced end-to-end

Establishes **one source of truth for every visual decision**, wires the
whole app to it, and **locks it in with CI** so it can't drift back.

### Foundations
- **Design-token system ("one knob per decision").** Every colour, text
size, spacing, corner radius, and shadow is a named token defined in
exactly one place — change the token, every screen updates. Collapsed
hundreds of near-duplicate definitions and removed "fake" duplicates
that pretended to be different but weren't.
- **Shared component library (O2).** Buttons, tables, dialogs, drawers,
form fields, badges, etc. already know the correct colours, spacing, and
dark-mode behaviour; new screens compose them instead of hand-styling.
Added new primitives on this branch (`OContent`, `KpiCard`) and
standardized existing ones.
- **One page structure everywhere** (`PageLayout` / `AppPageHeader` /
`AppPage` / `OContent`) — titles, breadcrumbs, spacing, and content
edges line up identically across every screen.
- **One table implementation** — all tabular data uses the same table
(sorting, density, sticky headers, empty states).
- **Styling consolidated onto Tailwind; old systems removed** —
hand-written CSS driven to the practical minimum, the legacy **Quasar**
framework fully removed, surviving stylesheets required to justify
themselves.
- **Two-tier corner radius** — a tight **4px** for controls and a soft
**12px** for surfaces (dialogs, cards, the app shell), plus a
full-circle option — replacing five radius names that all secretly meant
the same thing.

### Detailed improvements across screens
**Page structure & alignment** — unified page shell rolled across ~40+
screens (IAM, Settings, Alerts, Dashboards, Functions, Pipelines, RUM,
Metrics, Synthetics, Billing, editors, lists); one header height; one
page-edge grid driving headers, tables, rails, and tabs; unified
side-rail widths; inset rail selection/hover pills; every tab strip on
the grid line; tightened title/subtitle spacing.

**Tables (cross-screen)** — action columns consistently centered (incl.
Organizations); unified row-number column with no "#" truncation;
non-standard tables restyled to match; loading skeletons made
geometrically identical to the loaded table; symmetric edge inset; IAM
first-column grid alignment fixed.

**Traces** — flame graph + span-detail correlation panel fixes;
correlated logs/metrics placeholder fit; sticky headers; removed a
double scrollbar + a 1px sliver; aligned table fonts/badges; polished
the service detail drawer; stream-selector + correlation alignment;
aligned loading spinners; floating overlay arrows for the
disabled-services strip.

**Logs** — field-list controls aligned (focus ring no longer clipped);
detail-drawer spacing + metrics-tab overflow fixed; Run Query toolbar
tidied; listing sizing + stray border fixed.

**Metrics** — search added to the "Type" facet rail and aligned with the
other rails; proper empty states for the explorer and facet rail.

**Dashboards** — removed inconsistent card shadows; tightened
borders/resizers/field-list spacing; aligned View Dashboard chrome to
the grid; chart colours via the token helper.

**Home** — redesigned the Usage tab; added reusable KPI stat cards so
summary strips stop drifting.

**Dark mode** — new theme-switch animation; fixed a 1px content shift on
toggle and a white flash on load; fixed AI-chat text and assorted
light/dark mismatches; completed the token-driven dark migration.

**Empty states, controls & small polish** — restored 3 broken
empty-state animations; adopted the standard empty state; added the
sliding indicator to the toggle control; fixed the Quality-page inset +
drawer badge; refreshed Search History / Schedulers; fixed the
alert-history drawer scrollbar + timeline hover; removed a stray
menu-bar border.

### Dead code & cruft removal
- **Deleted the entire legacy `utilities.css`** global stylesheet (well
over a thousand lines) — evacuated in waves, roughly half of it dead
once traced.
- **Removed Quasar entirely**, including dead `.q-*` styles and ~25
phantom `--q-*` variables that were silently breaking bits of the UI.
- Stripped hundreds of **dead CSS classes and tokens that compiled to
nothing** — e.g. 46 uses of a colour class with no backing token, a
no-op shadow class on 51 elements, dead layout/utility classes, a
leftover `card-container` block, a dead table-actions token, and a
mis-registered gradient that rendered nothing.
- Cut **unused keyframe animations (19 → 3)** and removed **unused
components** + a stray build artifact.
- Net effect: a much smaller, leaner styling surface — less to maintain,
fewer dead ends to copy.

## Safety & verification
Large but low-risk: this is overwhelmingly a **styling and structure**
change, not product behaviour or data. Guarded by the
design-token/consistency/type checks above plus the existing test suite,
and reviewed screen-by-screen.

---------

Co-authored-by: Kirtan Thakkar <kirtan@kiara.tech>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: ktx-mihir <mihir.patel@kiara.tech>
2026-07-20 18:06:21 +00:00
ktx-mihirandktx-vaidehi 54fdbad0d8 fix: reports module form migration with zod (#12949)
- form migration with zod schema for reports module

---------

Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
2026-07-15 10:46:54 +00:00
ktx-kirtan 00b910a382 fix: remove quasar leftovers (#13180) 2026-07-14 11:35:46 +00:00
15541e3c1a fix(ci): stop rerun-detection crash + logs-9754 delete/re-ingest race (#13167)
Fixes two separate regression-suite CI failures observed in the
scheduled Playwright Regression run (surfaced on both OSS and ENT).

## 1. `Check if this is a rerun` step crashes on reruns
On a rerun the step queries the jobs API and iterates `.jobs[]`. When
the API returns a body **without** a `.jobs` key (rate-limit / error
response), jq hits `Cannot iterate over null`, exits 5, and under `bash
-e` the whole step dies — **skipping the entire test run**.

```
jq: error (at <stdin>:5): Cannot iterate over null (null)
##[error]Process completed with exit code 5.
```

`playwright.yml` was already hardened (`:-0` defaults + `2>/dev/null`),
but the fix was never backported to `playwright_regression.yml` — the
workflow that actually failed. This guards the jq with `(.jobs // [])` +
`2>/dev/null || echo "0"` and adds an explicit fallback to
`rerun_type=all` (run all tests — safe) when the counts aren't usable,
so the step can never abort the run.

## 2. `logs-9754.spec.js` delete → re-ingest race
The primary failure is a transient `expectLogsTableVisible()` timeout on
the `@P0 @highlighting` test. What turned that flake into a hard
failure: the describe runs in `serial` mode, so a failed test retries
the **whole block**. `afterAll` deletes the shared
`e2e_highlighting_test` stream but returns immediately, so the retry's
setup re-ingests into a still-deleting stream:

```
{"code":400,"message":"Error# stream [e2e_highlighting_test] is being deleted"}
```

The 5×3s setup retry window couldn't outlast the deletion, cascading
every retry to failure. `afterAll` now blocks on the existing
`waitForStreamDeletion()` helper so the next attempt starts from a clean
slate and Playwright's built-in retry becomes effective again.

## Changes
- `.github/workflows/playwright_regression.yml` — harden rerun-detection
jq + explicit fallback
-
`tests/ui-testing/playwright-tests/RegressionSet/Logs/logs-9754.spec.js`
— `afterAll` waits for stream deletion to settle

The ENT side of the workflow fix is in a companion PR. The spec fix
lives only here (the test folder is merged into ENT at CI time).

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-07-14 05:18:24 +00:00
Shrinath RaoandClaude Opus 4.8 cd634bae43 test: heal flaky logs field-values-cache regression test (readiness gate) (#12956)
## What

Heals the flaky **\`should fetch fresh field values when switching
streams\`** (`@fieldValuesCache @P1 @regression`) test in
`RegressionSet/Logs/logs-bugs.spec.js`, which failed the
`Logs-Regression` job in [o2-enterprise run
28454057830](https://github.com/openobserve/o2-enterprise/actions/runs/28454057830/job/84328391696).

## Root cause

The test ingests a unique `service_name=svc-automate-<runId>` into the
**shared** `e2e_automate` stream, then immediately drives the UI
field-values panel — with **no readiness gate** confirming that value is
searchable yet. Freshly-ingested data isn't queryable instantly (WAL →
index lag), so the `_values` call returns `svc-automate-*` values from
earlier runs/retries but misses the just-ingested one:

```
Error: Expected stream1 values to contain svc-automate-1782832273253, got: svc-automate-17828322504262
```

Playwright retries amplify it — each retry adds another `svc-automate`
value to the shared stream while still missing the current run's value,
so all retries fail.

> Note: the CI job's attempt-2 then crashed on a `jq: Cannot iterate
over null` error in the rerun-detection step. That is a **separate,
already-fixed** issue — current `main` already has `actions: read` on
the job + jq guards; the failing run executed a stale pre-fix workflow
snapshot (GitHub re-runs reuse the original attempt's YAML). No workflow
change is needed here.

## Fix

- Add `waitForFieldValueSearchable()` to `utils/data-ingestion.js` —
polls `_search` until the exact field value is returned (the proven
readiness-gate pattern, value-level rather than row-count level).
- Gate both the stream1 and stream2 ingested values before the UI
assertions.

## Verification

Run locally against a local OpenObserve with `--repeat-each=3`:

```
Stream1 field values: ["svc-automate-...0702","svc-automate-...4762"]              # accumulates (reproduces CI pollution)
✓ Stream1 shows correct value: svc-automate-1782833946762                          # current value always present now
...
3 passed (1.0m)
```

The accumulating `svc-automate-*` values across repeats reproduce
exactly the shared-stream pollution seen in CI, and the gate ensures the
current run's value is always present.

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 16:26:30 +00:00
Shrinath RaoandClaude Opus 4.8 8f81d41a80 test: heal logs Bug #4426 wrap-toggle assertion (switch to Table tab) (#12937)
## What

Heals the wrap-toggle assertion in the **Logs-Regression** shard — the
`text wrap toggle should not cause column misalignment on saved view
switch` test (Bug #4426) in `logs-bugs.spec.js`.

## Root cause

The test opens the log detail sidebar and asserts the wrap toggle is
visible. But the sidebar opens on the **JSON tab by default** (Bug
#9724), and the wrap toggle only renders in the **Table tab**. So the
assertion (`verifyWrapToggleVisibleInTableTab`) always waited out its
full `expect` timeout against the hidden toggle, then fell into the
`catch` and logged:

```
Wrap toggle not found in current log detail: Timed out 30000ms waiting for
expect(locator).toBeVisible()
Locator: locator('[data-test="log-detail-wrap-values-toggle-btn"]')
Received: hidden
```

This is the `Wrap toggle not found` warning visible in the scheduled
Logs-Regression run
[28373343106](https://github.com/openobserve/openobserve/actions/runs/28373343106).
The toggle assertion never actually verified anything and burned ~30s of
the shard's wall-clock as noise.

## Fix

Click the Table tab before asserting the toggle's visibility, so the
toggle actually renders and the check is meaningful (and fast).

```js
await pm.logsPage.clickLogDetailTableTab();
await pm.logsPage.verifyWrapToggleVisibleInTableTab();
```

## Verification

- Targeted run against a local OpenObserve instance: **passes in
10.9s**, now logging `✓ Wrap toggle is visible in Table tab` instead of
the timeout warning.
- Full Logs-Regression shard (all 4 spec files, 67 tests) run locally
beforehand: **67/67 passed** — no regressions.

```
npx playwright test playwright-tests/RegressionSet/Logs/logs-bugs.spec.js \
  -g "text wrap toggle should not cause column misalignment"
  ✓  ...logs-bugs.spec.js:1818:3 › ... @bug-4426 (10.9s)
  1 passed
```

## Note

The linked run's job-level failure was a runner **shutdown/cancel
signal** (infra reclaim) on the Logs-Regression shard plus a separate
failure in the `Merge Reports and Upload to TestDino` job — neither is a
test-code failure (all 67 logs tests pass locally). This PR addresses
the one genuine test-level defect surfaced in that run.

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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 16:31:34 +00:00
Shrinath RaoandClaude Opus 4.8 68ff976565 test: heal Logs-Regression failures (log detail sidebar + stream race) (#12908)
## What

Heals the **Logs-Regression** E2E shard failures from scheduled run
[28227009440](https://github.com/openobserve/openobserve/actions/runs/28227009440/job/83622550234)
(3 failed, 1 flaky).

## Root cause analysis

| # | Test | Symptom | Cause |
|---|------|---------|-------|
| 1 | `logs-9754.spec.js:276` — log detail sidebar @P1 | `waitFor
[data-test="log-table-column-0-source"]` 30s timeout in
`openLogDetailSidebar` | First result cell renders as the FTS
**body/message** column, not `source`, so the exact selector never
appears |
| 2 | `logs-regression.spec.js:1150` — JSON tab default (#9724) | Same
`openLogDetailSidebar` selector, 45s click timeout | Same as #1 |
| 3 | `logs-9754.spec.js:195` — preserve characters @P0 | `selectStream:
Failed to find stream "e2e_highlighting_test" after 5 attempts` |
**Cascade**: test #1 fails → serial block retries → `afterAll`
`deleteStream` from the prior attempt is still settling → re-ingest
returns `400 "stream [...] is being deleted"` → stream never re-appears
|
| 4 | `logs-regression.spec.js:60` — saved views (#9388) |
`log-search-index-list-add-log-field-btn` not visible | Hover-revealed
add button stayed below the fold; single re-hover missed |

`openLogDetailSidebar` is the dominant root cause — it directly explains
#1 and #2, and #1 triggers the serial-block retry that produces the #3
cascade.

## Fixes

1. **`openLogDetailSidebar`** — target any first-row cell via the
`[data-test^="log-table-column-0-"]` prefix instead of the exact
`...-source` cell. This mirrors the pattern already used by
`clickLogTableColumnSource` and `waitForSearchResults`, which carry the
same FTS-body-column note.
2. **`logs-9754` setup** — retry ingestion (up to 5×, 3s apart) when the
response says the stream `is being deleted`, so a serial-block retry no
longer cascades into "stream not found".
3. **`clickAddFieldToTableButton`** — `scrollIntoViewIfNeeded` +
re-hover with retries so the hover-revealed add button reliably surfaces
(#9388).

## Files
- `tests/ui-testing/pages/logsPages/logsPage.js`
-
`tests/ui-testing/playwright-tests/RegressionSet/Logs/logs-9754.spec.js`

## Validation
- `node --check` passes on both edited files.
- Full Playwright run deferred to CI / local verification (changes are
selector + retry hardening only; no production code touched).

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 13:24:28 +00:00
Shrinath RaoandClaude Opus 4.8 3b3f6b9df7 fix(test): harden SDR + Logs regression tests against CI render/index lag (#12893)
Two clusters of CI-only flakes — **every affected spec passes locally**;
all failures reproduce only under CI load (slow indexing /
re-rendering). All fixes are in test page-objects / setup — no product
or assertion changes.

## 1. SDR verification (o2-enterprise#2022, `e2e / SDR` — 7 failed)

`ingestionTime{Drop,Hash,Redaction}`, `queryTime{Drop,Hash,Redaction}`,
`multipleSDRPatterns` all died with `Field <name> should be visible but
was not found` (`foundLog === null`).

**Cause:** the verification helpers used **row count** as the readiness
signal for freshly-ingested logs. `fetchAllLogTexts` returned the moment
`minCount` rows rendered (the loose `tbody tr` fallback could even count
non-data rows), and `verifySingleFieldInLatestLog` broke on the first
non-null row — so under load they asserted against a partial/stale
result set before the fields were searchable. The per-field loop throws
on the first field, so the error always named the first field
(`website_url`/`user_email`/`multi_data`), masking the real cause.

**Fix (`sdrVerificationPage.js`):** make readiness content-aware —
`fetchAllLogTexts` takes `requiredFields` and retries until every
required field actually appears; `verifyMultipleFields` passes all
non-dropped fields; `verifySingleFieldInLatestLog` gates its retry loop
on field presence when expected.

## 2. Logs regression (scheduled Logs-Regression on `main` —
[OSS](https://github.com/openobserve/openobserve/actions/runs/28208045315)
/
[ENT](https://github.com/openobserve/o2-enterprise/actions/runs/28207989646),
3 failed + 1 flaky)

- **logs-9754** (`detail sidebar` / `unclosed brackets`): empty/late
table & `selectStream` not finding the stream — the setup only waited
for the stream to *exist*, not for its rows to be searchable. Gate the
setup on `waitForStreamData` (polls the search API).
- **#9724** (`detail sidebar JSON tab`): row resolved but the table was
still re-rendering → plain click timed out on "element not stable".
Harden `openLogDetailSidebar`: wait for a visible row, scroll into view,
click with a force fallback.
- **#9388** (`saved views stream switching`): the hover-revealed
add-field button was lost before the click. `clickAddFieldToTableButton`
now re-hovers the field row and waits again before failing.

## Verification (local, enterprise build `localhost:5080`)

| Suite | Result |
|-------|--------|
| 7 SDR specs | 14 passed |
| logs-9754.spec.js | 6 passed |
| logs-regression #9388 + #9724 | 2 passed |

```
npx playwright test playwright-tests/SDR/<spec>.spec.js --project=chromium
npx playwright test playwright-tests/RegressionSet/Logs/logs-9754.spec.js --project=chromium
npx playwright test playwright-tests/RegressionSet/Logs/logs-regression.spec.js -g "9388|9724" --project=chromium
```

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

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 02:33:47 +00:00
Shrinath RaoandClaude Opus 4.8 0afbe40fe4 test: fix flaky Alerts OSelect dropdowns (click trigger, not root div) (#12869)
## Problem

The scheduled **main** Playwright Regression run failed in the
**Alerts-Regression** shard ([run
28097849118](https://github.com/openobserve/openobserve/actions/runs/28097849118/job/83192928864))
with 2 tests failing on the **same** locator `[data-test$="-popover"]
[data-test$="-option"]` (dropdown options never found):

- `alerts-bugs.spec.js` › "Template should not appear twice in override
template input" (`@bug-10110`)
- `alerts-regression.spec.js` › "Bug #9967: PromQL alert creation"
(`@bug-9967`)

## Root cause

The alert form selects were migrated to the **OSelect** (reka-ui
popover) component. OSelect forwards the consumer's `data-test` onto an
**inner `<button data-test="...-trigger">`**, while the root element is
a plain `<div>`. Both tests clicked the **root `<div>`**, which does
**not** toggle the reka popover — `aria-expanded` stays `false`, the
popover never opens, and the option locator times out.

This is not caused by #12855; it reproduces on an older build too. The
codebase already had the correct pattern elsewhere (group-by select
clicks `[data-test$="-trigger"]`).

## Fix

- New shared helper `openOSelectDropdown(page, rootLocator)`
(`tests/ui-testing/pages/alertsPages/oselectHelpers.js`) that clicks the
inner `-trigger` and **retries until `aria-expanded="true"`** — the reka
trigger can open-then-close on a single Playwright click.
- `alertsPage.openAdvancedTemplateOverrideSelect()` uses the helper; the
spec now calls that page-object method (no raw locator in the spec).
- Routed **all 8** destination-dropdown open sites in
`alertCreationWizard.js` through the same helper (DRY; the same latent
bug affected every one).

## Validation (local, against running o2)

| Spec | Result |
|------|--------|
| `alerts-bugs.spec.js` | **4 passed** |
| `alerts-regression.spec.js` | **5 passed** (incl. Bug #9967 PromQL) |

Both originally-failing tests are green; no regressions across the
changed destination sites. Passed a Sentinel code-quality review (0
critical).

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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 14:36:41 +00:00
Neha PandClaude Opus 4.7 5e426a09c2 fix(tests): use generic selectors in AI regression test instead of rum-content-text (#12730)
## Summary

- The AI integrations regression test (`datasources-regression.spec.js`)
was using `.first()` to select the first integration in the sidebar, but
manifest-backed rich-content cards placed at the top of each category
render `AIRichSetupCard` or `AIIntegrationCard` — neither contains the
`[data-test="rum-content-text"]` element that the test expects.
- Fix: navigate directly to the "agno" child route and click the
agno-specific tab (`[data-test="ai-integrations-item-agno"]`). Agno is a
known stub integration without rich content that always uses the
`CopyContent` fallback.

## Test plan

- [ ] CI Playwright run: `Data Sources Regression Bug Fixes` suite
passes on chromium

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-17 10:32:06 +00:00
Neha PandClaude Opus 4.7 85a0e8d8a7 test: restructure RegressionSet/ into feature subdirectories (#12664)
## Summary
- Moves 17 spec files from flat `RegressionSet/` into 8 feature folders:
Alerts, Dashboards, General, Logs, Metrics, Pipelines, Streams, Traces
- Merges `logs-regression-bugs-2.spec.js` (9 tests) into
`Logs/logs-bugs.spec.js` (36 tests total), removing the duplicate file
- Drops the redundant `-regression` suffix from filenames (e.g.,
`alerts-regression-bugs.spec.js` → `alerts-bugs.spec.js`)
- Updates `.github/workflows/playwright_regression.yml` matrix with new
subdirectory paths
- Adds missing `logs-ent.spec.js` and `traces-ent.spec.js` to CI shards

## Test plan
- [ ] CI: Logs-Regression shard runs all 5 Logs files (merged bugs file
+ ent)
- [ ] CI: All 8 shards resolve correct file paths under
`RegressionSet/<Feature>/`
- [ ] No file references the deleted `logs-regression-bugs-2.spec.js`

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-16 11:21:46 +00:00
Neha PandClaude Opus 4.7 3c12561efd fix: add missing POM locators and fix Monaco keyboard input in regression tests (#12687)
## Summary
- Fixes 2 hard-failing regression tests (traces autocomplete + pipeline
destination save)
- Improves 6 flaky pipeline timeout tests

## Root causes

### Pipeline destination save test (line 513)
`destinationListAddBtn`, `destinationTypeCard`, `toastError`, and
`toastSuccess` were referenced in the test but never defined in
`PipelinesPage`. Added the four missing locators with their verified
`data-test` attributes.

### Traces autocomplete test (line 139)
The test clicked `.view-lines` (a display-only div) and used
`page.keyboard.type()`, but Monaco only routes keyboard input through
its hidden `.inputarea` textarea. Switched to Monaco's
`editor.trigger('keyboard', 'type', {text})` API which properly updates
the editor model and fires the autocomplete provider.

### Pipeline timeout tests (lines 73, 181, 289, 368, 451, 478)
Reduced `addPipeline` timeout from 30s to 15s so tests fail faster
instead of hanging when the pipeline page doesn't load. Combined with
`slowMo: 500`, the old 30s timeout amplified cascading delays in serial
test mode.

## Verification
Both hard-failure tests pass against the pentest environment:
- `traces-regression-bugs.spec.js:139` — PASSED (editor content:
"select", suggestions: true)
- `pipeline-regression.spec.js:513` — PASSED (no duplicate
notifications)

## Test plan
- [x] Traces autocomplete test passes
- [x] Pipeline destination save test passes
- [ ] Pipeline timeout tests run within CI timeout (improved, not fully
resolved)

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-16 06:09:22 +00:00
Neha PandClaude Opus 4.7 291903345e test: add E2E regression tests for 10 Needs-Automation issues (#12111)
## Summary

Adds Playwright E2E regression tests for **10 closed `Needs-Automation`
issues** across alerts, logs, pipelines, data sources, landing page, and
reports. This is Batch 1 of 3.

All tests pass against the dev environment
(`https://dev.o2aks1.internal.zinclabs.dev`).

## New Spec Files

| File | Issue | Description |
|------|-------|-------------|
| `datasources-regression.spec.js` |
[#11682](https://github.com/openobserve/openobserve/issues/11682) | AI
integration credentials persist on tab re-click |
| `landing-regression.spec.js` |
[#11604](https://github.com/openobserve/openobserve/issues/11604) |
Slack button opens functional page (not blank) |
| `reports-regression-bugs.spec.js` |
[#11231](https://github.com/openobserve/openobserve/issues/11231) |
Report timestamp not shifted by timezone on save |

## Tests Added to Existing Files

| File | Issue | Description |
|------|-------|-------------|
| `alerts-regression-bugs.spec.js` |
[#11315](https://github.com/openobserve/openobserve/issues/11315) | Bulk
alert import dialog opens without premature errors |
| `alerts-regression-bugs.spec.js` |
[#4342](https://github.com/openobserve/openobserve/issues/4342) | Alert
name with special characters `#`, `%`, `:` works |
| `alerts-regression-bugs.spec.js` |
[#4288](https://github.com/openobserve/openobserve/issues/4288) | SQL
`default` keyword without quotes works in alerts |
| `logs-regression-bugs.spec.js` |
[#10103](https://github.com/openobserve/openobserve/issues/10103) |
Explain Query close does not break results |
| `logs-regression-bugs.spec.js` |
[#8641](https://github.com/openobserve/openobserve/issues/8641) |
Non-SQL multi-stream query works without error |
| `logs-regression-bugs.spec.js` |
[#5839](https://github.com/openobserve/openobserve/issues/5839) | Shared
logs page displays searchbar correctly |
| `pipeline-regression.spec.js` |
[#11483](https://github.com/openobserve/openobserve/issues/11483) | No
duplicate notifications on pipeline destination save |
| `pipeline-regression.spec.js` |
[#11267](https://github.com/openobserve/openobserve/issues/11267) |
Evaluation template has proper UI styling |

## Removed

- `traces-regression-bugs.spec.js`: removed 4 skipped tests for features
unavailable in the dev environment
([#11392](https://github.com/openobserve/openobserve/issues/11392),
[#11318](https://github.com/openobserve/openobserve/issues/11318),
[#11280](https://github.com/openobserve/openobserve/issues/11280),
[#11590](https://github.com/openobserve/openobserve/issues/11590))

## POM Changes

- `logsPage.js`: added `clickExplainQuery()` method (reuses existing
`clickMoreOptionsButton()`)

## CI

- `playwright_regression.yml`: added `DataSources-Regression` and
`Reports-Regression` shards; added `landing-regression.spec.js` to
`GeneralTests-Regression`

## Framework Compliance

- All tests use PageManager via POM methods (no raw
`page.locator('[data-test=...]')` for interactions)
- All tests use `expect()` assertions (no conditional `test.skip()` for
false positives)
- All describe blocks have `beforeEach`/`afterEach` with structured
logging
- All tests tagged with `@bug-XXXXX`, `@P1`/`@P2`/`@P3`, `@regression`

## Test Plan

- [x] All 10 tests pass individually against dev environment
- [x] No framework violations (POM-first, no conditional skips)
- [ ] CI run on this PR

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 10:12:52 +00:00
Shrinath RaoandClaude Sonnet 4.6 af7d0e6696 test: harden rerun check step against GitHub API failures (#12486)
## Summary

- Adds `|| echo '{"jobs":[]}'` fallback on the `curl` call so a network
error or GitHub API rate-limit response never produces an empty/invalid
variable
- Adds `2>/dev/null || echo "0"` on both `jq` calls so a malformed API
response (non-JSON error body) falls back to `"0"` instead of
propagating a non-zero exit under `-eo pipefail`
- Changes the arithmetic comparison to `[ "${CURRENT_ATTEMPT_JOBS:-0}"
-eq "${TOTAL_MATRIX_JOBS:-0}" ]` with `2>/dev/null` so a `null` jq
output can't trigger "integer expression expected" and kill the step

**Failure mode fixed:** On re-runs, multiple matrix jobs query the same
GitHub API endpoint concurrently with the shared `GITHUB_TOKEN`. A
rate-limit `403` or transient network hiccup returns non-JSON, `jq`
exits non-zero, and with `set -eo pipefail` the whole "Check if this is
a rerun" step fails — blocking the job before any tests run.

**Degraded behaviour:** When the API is unavailable, both counts fall to
`0`, `0 -eq 0` → `rerun_type=all` → step succeeds → all tests run (same
as a normal rerun-all). The TestDino optimisation is skipped but nothing
is blocked.

Companion PR: openobserve/o2-enterprise#<ENT_PR>

## Test plan
- [ ] Trigger a re-run of a workflow run — "Check if this is a rerun"
step should pass even if GitHub API is slow/rate-limited
- [ ] Verify `rerun_type` is still correctly set to `failed` when the
API responds normally

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 12:25:29 +00:00
a749599898 fix: update e2e selectors for O2 component migration (#12346)
Replace Quasar-based selectors with O2 component equivalents across
alerts, dashboard, logs, and streams page objects. Key changes:
- OSwitch: target -btn suffix on inner button
- OSelect: use -trigger/-popover/-option suffixes, fallback to
[role="option"][data-test-value] when parent has no data-test
- OCombobox: use placeholder-based locators where no data-test exists
- OInput: descendant input selectors, pagination text format handling
- OTable: custom bottom slot pagination format ("N Stream(s)")

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: ktx-akshay <akshay.patil@kiara.tech>
2026-05-29 17:07:42 +00:00
+5 ae22a74e62 feat: ux improvement main (#11838)
#11720

Design at:

https://github.com/openobserve/designs/blob/main/dashboards/ux-improvement-dialog/design.md

---------

---------

Co-authored-by: ktx-vaidehi <134508096+ktx-vaidehi@users.noreply.github.com>
Co-authored-by: Abhay Padamani <141122205+ktx-abhay@users.noreply.github.com>
Co-authored-by: Sai Nikhil <nikhil@openobserve.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: ktx-akshay <akshay.patil@kiara.tech>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
Co-authored-by: ktx-mihir <mihir.patel@kiara.tech>
Co-authored-by: ktx-riya <riya.kukadiya@kiara.tech>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Omkar Kesarkhane <127078473+omkarK06@users.noreply.github.com>
Co-authored-by: omkark06 <omkar@zinclabs.io>
Co-authored-by: ktx-vaidehi <vaidehi.akhani@kiara.tech>
Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
2026-05-28 11:00:49 +00:00
Shrinath RaoandClaude Sonnet 4.6 e79cb30b30 test: move enterprise-only regression tests to *-ent spec files (#12298)
## Summary

- Moves 3 enterprise-only tests out of OSS regression spec files into
dedicated `*-ent` spec files
- These spec files live in the OSS repo but are **not referenced in the
OSS CI workflow** — they are picked up only by the enterprise CI
- Fixes recurring failures in the OSS regression run caused by features
that don't exist in OSS builds

## Why the tests were failing in OSS

| Shard | Test | Root cause |
|---|---|---|
| Traces-Regression | Service graph side panel (Bug #11687) |
`[data-test="traces-service-graph-toggle"]` is wrapped in
`v-if="config.isEnterprise == 'true'"` in `SearchBar.vue` — element
never renders in OSS → 45s timeout |
| Logs-Regression | Scheduled Search navigation (Bug #7354) | `POST
/api/{org}/search_jobs` returns **404** in OSS — endpoint is
enterprise-only |

## Changes

**New files:**
-
`tests/ui-testing/playwright-tests/RegressionSet/logs-regression-ent.spec.js`
— Scheduled Search / `search_jobs` describe block (2 tests)
-
`tests/ui-testing/playwright-tests/RegressionSet/traces-regression-ent.spec.js`
— service graph side panel test (Bug #11687)

**Modified files:**
- `logs-regression-9044-7354.spec.js` — removed the `#7354` Scheduled
Search describe block; `#9044` scroll retention tests remain
- `traces-regression.spec.js` — removed Bug #11687 service graph test
block

The companion PR in `o2-enterprise` adds these two files to the
Logs-Regression and Traces-Regression shards of the enterprise workflow.

## Test plan
- [ ] OSS regression CI (`playwright_regression.yml`) should pass — no
more enterprise-only test failures
- [ ] Enterprise regression CI picks up `*-ent.spec.js` files via the
companion workflow PR

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 11:22:44 +00:00
Neha PandClaude Opus 4.7 2125f6e6da test: add 15 E2E regression tests for logs and traces bugs (#12084)
## Summary

Adds Playwright E2E regression tests for 15 verified bug fixes. Tests
are added to the existing CI matrix files:

- 6 logs tests in `logs-regression-bugs-2.spec.js`
- 9 traces tests in `traces-regression-bugs.spec.js`

Also fixes framework compliance: all raw `page.locator()` calls moved to
page object getter methods, missing assertions added, and flaky test
logic fixed in #10595.

## Logs bugs covered

| Bug | Description |
|-----|-------------|
| #11606 | include/exclude search term gets added at incorrect position
|
| #9339 | collapse or expand the indexlist wont redraw the histogram
chart |
| #7310 | search term appended instead of replaced in streams dropdown |
| #5277 | column positions change back after re-running query |
| #4426 | text wrap toggle causes column misalignment on saved view
switch |
| #4091 | cancel query button on visualize page |

## Traces bugs covered

| Bug | Description |
|-----|-------------|
| #11816 | trace API called multiple times with auto search enabled |
| #11815 | traces not sorted correctly when sorted by spans column |
| #11531 | spans tab method column references non-existent field |
| #11446 | incorrect duration value in logs detail traces tab |
| #11384 | switching organization does not clear trace explorer results
|
| #11244 | timestamp values inconsistent between traces and logs |
| #8978 | no cancel option while running a query in traces |
| #4151 | trace values not visible on hover in dark mode |
| #2887 | traces should be orderable by duration column |

## Files changed

| File | Change |
|------|--------|
| `tests/ui-testing/pages/logsPages/logsPage.js` | 9 new getter methods
for selectors |
| `tests/ui-testing/pages/tracesPages/tracesPage.js` | 14 new getter
methods for selectors |
|
`tests/ui-testing/playwright-tests/RegressionSet/logs-regression-bugs-2.spec.js`
| 6 new tests, 0 raw locators, fixed #10595 |
|
`tests/ui-testing/playwright-tests/RegressionSet/traces-regression-bugs.spec.js`
| 9 new tests, 0 raw locators |

## Test plan

All 21 tests (15 new + 6 existing) pass against the dev environment. No
new CI config needed — both spec files are already listed in
`playwright_regression.yml`.

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 13:02:02 +00:00
Neha PandClaude Opus 4.7 7157b8feb3 test: add E2E regression tests for scroll retention (#9044) and undefined length (#7354) (#12061)
## Summary
- Adds 2 new E2E regression test specs to `RegressionSet/` for recently
fixed bugs
- Adds 13 new page object methods to `logsPage.js` for scroll,
pagination, scheduled search, and sidebar navigation

https://github.com/openobserve/openobserve/issues/7354
https://github.com/openobserve/openobserve/issues/9044
## Tests Added

### scroll-retention-9044.spec.js (3 tests) 
- Scroll resets to top when navigating page 1 → page 2 via page number
button
- Scroll resets to top when navigating page 2 → page 1
- Scroll resets to top via Next Page (>) button

### undefined-length-7354.spec.js (2 tests)
- No "Undefined Length" error after navigating Logs → Scheduled Search →
Streams → Logs
- No console errors containing "undefined" or "length" after the
reproduction path

## CI
- Updated `playwright_regression.yml` to include both new spec files in
the `Logs-Regression` matrix

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 09:09:20 +00:00
Neha PandClaude Opus 4.7 f2f467b96e test: add regression tests for traces bugs #11687 and #11689 (#11718)
- #11689: Service Catalog clear search filter blanks page regression
- #11687: Service graph side panel $ pattern fix verification
- Added clickServiceCatalogTab() and clickFilterClearButton() to
servicesCatalogPage

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 17:06:17 +00:00
Neha PandClaude Opus 4.7 7eed0d0289 test: add regression E2E batch-1 for traces, logs, and alerts (#11706)
## Summary
- Adds 8 bug regression tests across 3 spec files covering Traces, Logs,
and Alerts
- Expands page objects with `skipNavigation` support in
LogsPage.selectStream()
- Fixes `isSuggestionWidgetVisible()` in TracesPage to use
`page.evaluate()` (CSS override bypass)
- Integrates all 3 specs into the CI regression pipeline

## Tests Covered

| Suite | Bug # | Description |
|-------|-------|-------------|
| Traces | #10743 | Stream persistence across navigation |
| Traces | #11580 | Query editor resets after stream type switch |
| Traces | #11217 | Trace editor autocomplete when typing |
| Logs | #10821 | Quick mode toggle click interaction |
| Logs | #10595 | Single row expansion after run query |
| Logs | #9049 | Decimal values rejected in datetime picker |
| Alerts | #10110 | Template not duplicated in override input |
| Alerts | #11577 | Preview chart renders with numeric y-axis |

## Test Results
- **8 passed, 0 skipped, 0 failed** against dev env

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 03:24:52 +00:00
ktx-akshay 5d86357fdd test: add regression tests for same-dashboard drilldown-URL clobbering (#11661) 2026-05-08 05:42:40 +00:00
Neha PandClaude Opus 4.7 c41779f779 test: add alerts stream-switching regression tests for 5 canvas/graph bugs (#11651)
## Summary

- Adds 18 new POM methods to `alertsPage.js` for stream-type/query-mode
coherence verification, chart state assertions, query editor
interaction, and aggregation field filtering
- Adds 5 helper methods to `alertCreationWizard.js` for full editor
open/close, stream switching, and query execution
- Adds new regression spec `alerts-stream-switching-regression.spec.js`
covering 5 closed bugs:

| Bug | Description |
|-----|-------------|
| #11580 | Metrics+PromQL -> Logs, PromQL editor persists |
| #11572 | Logs -> Metrics -> Logs, chart error "No field named value" |
| #11571 | Builder -> SQL, chart blank table instead of line |
| #11573 | Full editor open/close blanks the graph |
| #11578 | Agg functions don't filter to integer fields |

## Test plan

- [ ] Run `alerts-stream-switching-regression.spec.js` against dev
environment
- [ ] All 5 tests pass with no raw selectors in spec (POM-compliant)
- [ ] Chart assertions verify canvas child exists (not just bounding
box)

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 14:46:49 +00:00
Neha PandClaude Opus 4.7 0b730213aa test: add regression tests for 10 closed logs bugs (#11632)
## Summary
- Adds 10 automated regression tests for closed bug fixes verified by
Test-Assist
- All tests appended to
`tests/ui-testing/playwright-tests/RegressionSet/logs-regression-bugs.spec.js`
- No environment streams used — all tests use test-created streams only

## Tests Added

| Bug | Title | Priority |
|-----|-------|----------|
| [#8224](https://github.com/openobserve/openobserve/issues/8224) |
Showing message not displayed on logs page | P2 |
| [#5894](https://github.com/openobserve/openobserve/issues/5894) |
Timestamp not default selected for multi stream | P2 |
| [#10344](https://github.com/openobserve/openobserve/issues/10344) |
Run query button infinite loading switching home/logs | P0 |
| [#11469](https://github.com/openobserve/openobserve/issues/11469) |
Copy/include/exclude shown on hover in traces correlation | P2 |
| [#5010](https://github.com/openobserve/openobserve/issues/5010) |
Console error when aggregating with non-existent alias | P1 |
| [#5278](https://github.com/openobserve/openobserve/issues/5278) |
Pagination not showing when histogram is turned off | P1 |
| [#3821](https://github.com/openobserve/openobserve/issues/3821) |
Cannot read partitions error on stream change during query | P1 |
| [#6702](https://github.com/openobserve/openobserve/issues/6702) |
Partitions error when switching pages during query | P1 |
| [#3131](https://github.com/openobserve/openobserve/issues/3131) |
Order by not default for distinct queries | P2 |
| [#4315](https://github.com/openobserve/openobserve/issues/4315) |
Blank histogram on cancelling histogram query | P2 |

## Test Plan
- [x] All 10 tests pass on first run against testing env
- [x] No environment streams used (only e2e_automate + dynamically
created)
- [x] Tags follow convention: `@bug-XXXX`, `@P*`, `@regression`,
functional tags

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

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 07:09:03 +00:00
Omkar Kesarkhane 1096193a22 fix: In traces changing org should reset the trace results (#11517)
#11384 
#11392
2026-04-29 09:40:06 +00:00
Neha PandClaude bff8735bb5 test: add E2E regression tests for bugs #11400 and #11498 (#11527)
## Summary
- **Bug #11498**: Add P0 smoke tests verifying Run Query button
disabled/enabled state based on stream selection in pipeline scheduled
dialog
- **Bug #11400**: Add P2 functional tests (3 tests) for query editor
fixes:
1. Double-quote validation via Monaco DOM warning markers
(`.squiggly-warning`)
2. Functions filtered from value-context suggestions in WHERE clause
(`effectiveKeywords` computed property)
3. Mixed quote handling in multi-condition WHERE clauses (`hasOpenQuote`
regex scoping fix)

## Changes
- `logs-regression.spec.js`: Added 3 Bug #11400 tests (lines 1525-1728)
- `pipeline-regression.spec.js`: Added 2 Bug #11498 tests
- `logsPage.js`: Added 6 POM methods for Monaco suggestion widget
interaction
- `pipelinesPage.js`: Added POM methods for Run Query state and
destination validation
- `.gitignore`: Added test artifact patterns

## Test Plan
- [x] All 3 Bug #11400 tests verified passing (`--headed --workers=1`)
- [x] Bug #11498 tests verified passing in prior session
- [x] Tests use DOM-based inspection (no `window.monaco` dependency)
- [x] Graceful fallback when suggestion widget unavailable (field values
not cached)

## Related
- Fixes PR #11502 (Bug #11498)
- Fixes PR #11403 (Bug #11400)
- Docs: `docs/test_generator/cases/pipeline-bugs-test-cases.md`

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-29 09:19:49 +00:00
1337a04058 fix: alert revamp version 3 (#11253)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 13:15:39 +05:30
1365e18e23 test: automation for bug fixes (#11250)
## Summary

Adds automated regression tests for 3 bugs marked as
**Needs-Automation** in v0.80.0 milestone.

## Tests Added

### 1. Bug #10110 - Template Duplication in Alerts UI ✅
- **Issue:** https://github.com/openobserve/openobserve/issues/10110
- **Bug:** Template appeared twice in override template input field
- **Test:** Validates template appears exactly once, no duplicate
components
- **Result:** PASSED (2.3m)

### 2. Bug #9043 - Trace Pagination Cursor Reset ✅
- **Issue:** https://github.com/openobserve/openobserve/issues/9043
- **Bug:** Pagination cursor reset when navigating back from trace
details, causing duplicates
- **Test:** Validates cursor preserved, no duplicates, trace count
maintained (327 → 327)
- **Result:** PASSED (1.8m)

### 3. Bug #7671 - FTS and Quick Mode Field Indicators ✅
- **Issue:** https://github.com/openobserve/openobserve/issues/7671
- **Bug:** FTS and quick mode fields should be visually indicated in
stream settings
- **Test:** Validates FTS option visible, quick mode icon mechanism in
place
- **Result:** PASSED (1.5m)

## Validation

All tests validated on dev cluster and follow OpenObserve testing
standards:
✅ POM patterns | ✅ TestLogger | ✅ Proper assertions | ✅ Parallel
execution

## Related Issues

Closes #10110, #9043, #7671 (automation requirements)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Neha P <undefined@users.noreply.github.com>
2026-04-15 13:58:24 +00:00
Shrinath RaoandClaude Sonnet 4.6 b308e83568 test: migrate GeneralTests and RegressionSet specs for alpha1 cloud (Set 12) (#11227)
## Summary
- Migrate `landingPage.spec.js` and `languageTranslation.spec.js`
(GeneralTests) for alpha1 cloud compatibility
- Migrate `alerts-regression.spec.js` and `logs-9754.spec.js`
(RegressionSet) for alpha1 cloud compatibility
- Replace all `process.env["ORGNAME"]` / `process.env.ORGNAME` with
`getOrgIdentifier()` from `cloud-auth.js`
- Add `waitForStreamAvailable` to `logs-9754.spec.js` for cloud indexing
delays
- Fix `playwright-alpha1.config.js` to override `INGESTION_URL` when
`.env` sets it to localhost

## Test plan
- [x] All 4 spec files run against alpha1 cloud — 21/22 passed
- [x] 1 flaky failure in alerts-regression (PromQL alert list visibility
timeout — not migration-related)
- [ ] CI run on `playwright_alpha1.yml` workflow with both branches

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 10:34:32 +00:00
Neha PandClaude ed5eca54fb test: tests for bug fixes (#11178)
https://github.com/openobserve/openobserve/issues/11174

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-04-09 13:28:54 +00:00
4f8d50a474 test: migrate RegressionSet specs for alpha1 cloud (Set 11) (#10924)
## Summary
- Migrate 6 RegressionSet spec files for alpha1 cloud compatibility
- Replace `process.env["ORGNAME"]` with `getOrgIdentifier()` from
`cloud-auth.js` across all files
- Full framework migration of `pipeline-regression.spec.js`: ESM → CJS
imports, `LoginPage` login → `navigateToBase` + `PageManager` pattern
- Add `cloud-auth.js` imports to all 6 files

## Files Changed
- `logs-regression.spec.js` — 3 ORGNAME replacements + import
- `logs-regression-bugs.spec.js` — 6 ORGNAME replacements + import
- `streams-regression.spec.js` — 1 ORGNAME replacement + import
- `ui-regression.spec.js` — 2 ORGNAME replacements + import
- `enrichment-regression.spec.js` — 1 ORGNAME replacement + import
- `pipeline-regression.spec.js` — full rewrite (ESM→CJS,
LoginPage→navigateToBase, ORGNAME→getOrgIdentifier)

## Test plan
- [x] Run RegressionSet against alpha1 cloud locally: 37 passed, 1
skipped, 3 pre-existing failures (not migration-related)
- [ ] CI run on alpha1 cloud workflow

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Shrinath Rao <undefined@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-08 17:21:14 +00:00
Neha PandClaude 6cc680f1a3 test: add regression test for field values cache bug when switching streams (#10623)
- Add test to verify field values refresh when switching between streams
- Ingests data into two streams with same field name but different
values
- Verifies UI fetches fresh values from new stream instead of showing
cached values

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-24 17:41:14 +05:30
Neha PandClaude 407d12d135 test: add regression tests for query inspector, sorting, and logs expand (#10586)
## Summary
Add Playwright regression tests for logs functionality:

- **Query Inspector**: Verify readonly flag in buildSearch doesn't
mutate logs state
- **Sorting Logs**: Verify logs are sorted correctly when response has
order_by_metadata
- **Logs Expand**: Verify last log maintains highlighting when expanding
other log entries

Tests use Page Object Model pattern with methods added to logsPage.js.

Tests for https://github.com/openobserve/openobserve/pull/10580

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-23 14:00:13 +05:30
82c8b1c7f6 test: add logs regression tests for quick mode and pagination bugs (#10541)
- Add test for quick mode query being removed when selecting interesting
field
- Add test for pagination visibility with histogram and SQL disabled
- Add test for error message identifying problematic field

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
2026-02-19 13:02:08 +05:30
Shrinath RaoandClaude Opus 4.6 d573d01a62 fix(test): eliminate bare networkidle timeouts across entire test suite (#10494)
## Summary

- Replaced every bare `waitForLoadState('networkidle')` with `{ timeout:
10000 }.catch(() => {})` across **56 files** (35 spec files, 21 page
objects)
- OpenObserve pages maintain persistent RUM/replay/WebSocket connections
that prevent `networkidle` from ever resolving, causing 90s timeout
crashes
- Added `fetchWithRetry` helper for transient 502/proxy errors in SDR
multi-pattern `beforeAll`
- Bumped SDR multi-pattern test timeout from 300s to 420s for CI

## Files changed

**Page objects (21 files):** alertsPage, alertManagement,
alertCreationWizard, alertTemplatesPage, alertBulkOperations, logsPage,
streamsPage, streamAssociationPage, sdrPatternsPage,
sdrVerificationPage, dashboardPage, functionsPage, pipelinesPage,
enrichmentPage, sanityPage, schemaPage, loginPage, commonActions, and
more

**Spec files (35 files):** All SDR specs, all Traces specs, all Logs
specs, all RegressionSet specs, Alerts specs, Pipelines specs,
Dashboards specs, Functions specs, GeneralTests specs, wait-helpers
utility

## Test plan

- [x] Verify zero bare `networkidle` calls remain in `tests/ui-testing/`
- [ ] CI passes for SDR, Streams, Logs Regression, and other test suites

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:42:32 +05:30
Neha PandClaude d729d9cfbe test: e2e testcase for bug #9754 (#10365)
### **PR Type**
Tests, Enhancement


___

### **Description**
- Add Playwright regression coverage for bug #9754

- Ingest edge-case logs with unclosed delimiters

- Assert table, highlighting, and detail sidebar

- Extend LogsPage with helper accessors


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Playwright regression spec: bug #9754"] 
  B["Ingest edge-case log messages"] 
  C["Logs UI assertions (table/search/highlighting)"] 
  D["Log detail sidebar JSON assertions"] 
  E["LogsPage page-object helpers"] 
  F["Stream cleanup via API"]
  A -- "sends test data" --> B
  A -- "verifies rendering" --> C
  A -- "verifies sidebar content" --> D
  A -- "uses helper methods" --> E
  A -- "deletes test stream" --> F
```



<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 helpers for log
detail and highlights</code>&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>Add <code>getLogDetailJsonContentText()</code> for JSON detail
text<br> <li> Add <code>getHighlightedElementsCount()</code> to count
<code>.log-highlighted</code><br> <li> Log helper actions via
<code>testLogger</code></ul>


</details>


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

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>logs-9754.spec.js</strong><dd><code>Add regression
suite for logs highlighting bug</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

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

<ul><li>Add serial Playwright suite targeting bug #9754<br> <li> Ingest
logs with unclosed brackets/quotes/ANSI sequences<br> <li> Assert no
character loss in table and highlighting<br> <li> Validate log detail
sidebar JSON and cleanup stream</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10365/files#diff-169784bd6a86705694f5cdda656a31e6ff390cf1f76cfb9aec8ff4a652ae5f31">+403/-0</a>&nbsp;
</td>

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

</details>

___

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-04 17:31:04 +05:30
Shrinath RaoandClaude Opus 4.5 3bdf5cb210 test: resolve E2E test timeouts by replacing networkidle with deterministic waits (#10211)
## Summary

This PR fixes flaky E2E tests by replacing unreliable `networkidle`
waits and hard-coded timeouts with deterministic waiting strategies.

### Changes Made

#### 1. Replace `networkidle` with `domcontentloaded` + explicit waits
- `networkidle` waits for zero network activity for 500ms, which times
out in SPAs with persistent connections (WebSockets, polling, telemetry)
- Replaced with `domcontentloaded` plus explicit element/URL waits

#### 2. Replace hard-coded `waitForTimeout` with `waitForResponse`
- `alerts-incidents-tabs.spec.js`: Use `waitForResponse` for `/config`
API instead of `waitForTimeout(2000)`
- `logs-regression.spec.js`: Use `waitForResponse` for `/streams` API
instead of `waitForTimeout(3000)`

#### 3. Fix Alerts/Incidents menu visibility timing
- Increased timeout for incidents menu item (depends on
`service_graph_enabled` from config API)
- Added `waitFor` pattern before expect assertions in `alertsPage.js`
- Use `waitForResponse` for search API after page refresh

#### 4. Enable parallel test execution
- Enable parallel mode in `ui-regression.spec.js`
- Use unique stream names (with timestamp) to avoid test conflicts

## Files Changed

| File | Changes |
|------|---------|
| `logs-regression.spec.js` | Replace networkidle → domcontentloaded,
waitForTimeout → waitForResponse |
| `ui-regression.spec.js` | Enable parallel mode, use waitForURL for
navigation |
| `alerts-incidents-tabs.spec.js` | Replace networkidle →
domcontentloaded, waitForTimeout → waitForResponse |
| `alertsPage.js` | Improve menu visibility waits, replace networkidle
with domcontentloaded |

## Fixes

- Alerts E2E test timeouts waiting for incidents menu item
- logs-regression.spec.js: #9388 saved views, #9475 apostrophes
- ui-regression.spec.js: #9325 header navigation, #9565 org_identifier

## Test Plan

- [x] All alerts-incidents-tabs tests pass locally (3 passed, 2 skipped)
- [x] logs-regression tests pass locally
- [x] ui-regression tests pass locally
- [x] Tests run in parallel successfully

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 19:11:13 +05:30
Neha PandClaude bb765e6b7b test: add regression bug tests (#10132)
### **User description**
- Add logs-regression-bugs.spec.js for core logs page bugs (#9996,
#9796, #9533, #8928)
- Change logs-regression-bugs from serial to parallel mode for faster
execution
- Add try/catch resilience for apostrophe test (Bug #9475)
- Add graceful skip for auto-refresh test when button disabled (Bug
#9877)
- Fix networkidle timeout in pipeline preview test (Bug #9498)
- Add test.skip() pattern for OpenAPI test (Bug #9308)
- Fix hoverOnFieldExpandButton logic bug in logsPage.js
- Add isLiveMode5SecEnabled() and getPageContent() POM methods
- Add stream details methods to streamsPage.js
- Add pipeline regression methods to pipelinesPage.js

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


___

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


___

### **Description**
- Enhance POM with robust waits and new regression methods

- Add comprehensive logs regression tests for bugs #9996, #9796, #9533,
#8928

- Introduce VRL-specific tests (saved views #9690, icon absence #9550)

- Add pipeline and streams regression tests (#9354, #9498, #10029)


___



<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><details><summary>3
files</summary><table>
<tr>
<td><strong>logsPage.js</strong><dd><code>Add robust wait and regression
POM methods</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-8045b343491d8943869c1af74cdafab204dc49c02a70294417e73f47d35e0b59">+115/-4</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>pipelinesPage.js</strong><dd><code>Add regression POM
methods for pipeline interactions</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-d5f2771fd1139c174c46d09a9ab2da0ea4588b853e2b87e4728322d072542f49">+105/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>streamsPage.js</strong><dd><code>Add regression POM methods
for streams interactions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-792df584eb1625d35fd1e33a5a37aa3ada28f15ec1e77a1921f1c56e50bf70d2">+61/-0</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>10
files</summary><table>
<tr>
<td><strong>enrichment-table-url.spec.js</strong><dd><code>Add
enrichment table search and CSV tests</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-faa0d1fc147a442b9738f5287bb60e22ddf44bae8568f7aeb6cfba0a267d138b">+116/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>logspage.spec.js</strong><dd><code>Add VRL saved view
regression test</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-b1a64252adae01c5e8f7e758e3c820f5476260f60c44a4a57b4f15a05a59a85a">+172/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>logstable.spec.js</strong><dd><code>Add VRL include/exclude
icon regression test</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-4d69d08f317ffc4a26179c74da0418c4db4184ce5f4f96a8df70af7a5a02008c">+119/-7</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>pipeline-core.spec.js</strong><dd><code>Add VRL function
node pipeline test</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-3e57cb10518ffdfd480b0d5ec65db1fcee8419e9093ac0777ebabed4fccf2246">+75/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>pipelines.spec.js</strong><dd><code>Add pipeline
enable/disable toggle test</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-948dbdd764f739f3a4bcbb8c643ec4721e08695031bd9791040d68f7df842aee">+91/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>logs-regression-bugs.spec.js</strong><dd><code>Create logs
regression bug fix spec</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-c53c1c43378b285365467bf61d779983eae7d287f2ad18265db590270ed6ff6c">+214/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>logs-regression.spec.js</strong><dd><code>Enhance apostrophe
and auto-refresh regression tests</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-99da86ede55fa5f2e3d3fbef897ba7aaa5a7db702a0135f66ac4c888fc7311b6">+36/-11</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>pipeline-regression.spec.js</strong><dd><code>Extend
pipeline regression tests for preview and backfill</code></dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-6dd04b750c40b11abea987a130c1af35d7c89b74c303a2ad49207df5fe3a37e3">+146/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>streams-regression.spec.js</strong><dd><code>Add FTS
auto-add streams regression test</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-1c2aad49737186272645ea4cf0f7e3080e28d0c4d8585b3d07edc1889368591d">+39/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>ui-regression.spec.js</strong><dd><code>Enhance UI
regression tests and skip logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10132/files#diff-8ade144a0a63d887d5c6c9070c250dac9360925be9e6e5145ea4a0f43ceb2fdf">+116/-35</a></td>

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

</details>

___

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-22 12:16:41 +05:30
cb0855360b test: add E2E automation for Bug #9967 - PromQL alert creation (#9995)
### **User description**
## Summary

Adds comprehensive E2E automation tests for Bug #9967 (cannot save alert
when selecting PromQL mode for metrics streams).

### Test Coverage

**Test 1: Comprehensive PromQL alert creation validation (P0/P1)**
- Verifies PromQL tab visibility for metrics streams
- Validates "Trigger if the value is" condition row appears in Step 4
- Tests operator dropdown and value input visibility
- Verifies mode switching clears PromQL condition when switching to
Custom
- Creates and saves alerts with different operators (`>=`, `<=`)

**Test 2: Loading existing PromQL alert (P2)**
- Creates a PromQL alert via API
- Opens alert for editing
- Verifies PromQL condition fields load correctly in edit mode

### Files Changed

| File | Description |
|------|-------------|
|
`tests/ui-testing/playwright-tests/RegressionSet/alerts-regression.spec.js`
| New test file with 2 comprehensive tests |
| `tests/ui-testing/pages/alertsPages/alertsPage.js` | Added 20+ POM
methods for PromQL alert testing |
| `tests/ui-testing/pages/alertsPages/alertCreationWizard.js` | Fixed
stream selection retry logic |
| `tests/ui-testing/playwright-tests/cleanup.spec.js` | Added
`e2e_promql_` cleanup patterns |

### New Page Object Methods

- `clickAddAlertButton()`, `fillAlertName()`, `selectStreamType()`,
`selectMetricsStream()`
- `selectScheduledAlertType()`, `clickContinueButton()`,
`clickBackButton()`
- `expectPromqlTabVisible()`, `clickPromqlTab()`,
`expectCustomTabVisible()`, `expectSqlTabVisible()`
- `expectPromqlConditionRowVisible()`,
`expectPromqlConditionRowNotVisible()`
- `expectOperatorDropdownVisible()`, `expectValueInputVisible()`,
`getPromqlConditionValue()`
- `clickStepIndicator()`, `expectAlertRowVisible()`,
`clickAlertUpdateButton()`

## Test plan

- [x] Tests pass locally with `npx playwright test
playwright-tests/RegressionSet/alerts-regression.spec.js`
- [x] Code passes Sentinel audit (Page Object Model compliance)
- [ ] CI pipeline passes

## Related

- Fixes #9967
- Related PR #9970 (fix implementation)


___

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


___

### **Description**
- Add PromQL trigger condition support

- Initialize and clear `promql_condition` logic

- Include `promql_condition` in payload builder

- Add unit and E2E tests for PromQL


___

### Diagram Walkthrough


```mermaid
flowchart LR
  Settings["AlertSettings.vue: PromQL input"]
  Component["AddAlert.vue: init and clear promql_condition"]
  Payload["AddAlert.vue: include/clear promql_condition"]
  UnitTests["AddAlert.spec.ts: PromQL unit tests"]
  E2ETests["alerts-regression.spec.js: PromQL E2E tests"]

  Settings --> Component
  Component --> Payload
  Payload --> UnitTests
  Payload --> E2ETests
```



<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><details><summary>5
files</summary><table>
<tr>
<td><strong>AddAlert.spec.ts</strong><dd><code>Add unit tests for PromQL
conditions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9995/files#diff-84362398fea8abd9acf30f4f40ba8d4cf27348677454017bd4e6f568d5176ac6">+397/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>alertCreationWizard.js</strong><dd><code>E2E method for
PromQL alert creation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9995/files#diff-3b0a08b55d132502596d17c9d5f197de6d4779684de96ce570282e2402942e2e">+239/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>alertsPage.js</strong><dd><code>Add POM methods for PromQL
tests</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; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9995/files#diff-79ee01d6d7f145f19207b93b87143b545a1188cfc6a82bc8c45fecfbf68f8a1d">+243/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>alerts-regression.spec.js</strong><dd><code>Add
comprehensive PromQL E2E tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9995/files#diff-123b8d960345fd76542aa75316be70b7d8fe088b4ba59127f14ddb53f5b52d8a">+562/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>cleanup.spec.js</strong><dd><code>Extend cleanup for PromQL
test prefixes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9995/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+4/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Enhancement</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>AddAlert.vue</strong><dd><code>Initialize and handle
`promql_condition` logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9995/files#diff-7b426bb23e9ed0250c3877d6d97b099c42b2d20e22ddf4459915381b2233a0a8">+27/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>AlertSettings.vue</strong><dd><code>Add PromQL condition
input and validation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9995/files#diff-1d5bfd6a1ea672884193649b1271d751d6f3b8ec84af759071c9bfd169a8ab28">+111/-7</a>&nbsp;
</td>

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

</details>

___

---------

Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-01-15 21:54:06 +05:30
b3f79b6727 test: add bug regression tests to RegressionSet suite (#9899)
### **User description**
Added automated tests for 4 verified bug fixes to the regression test
suite:

Bug Tests Added:
- Bug #8349 (P1): SQL _timestamp alias rejection validation
- Bug #7468 (P1): Multi-stream ellipsis with tooltip display
- Bug #9475 (P1): Apostrophes/special characters without truncation
- Bug #9877 (P0): Auto refresh time range updates

Changes:
- Added 3 bug tests to logs-regression.spec.js (#8349, #9475, #9877)
- Added 1 bug test to streams-regression.spec.js (#7468)
- Added 7 new POM methods to logsPage.js for stream display and tooltip
handling
- Removed duplicate tests from original locations (logspage.spec.js,
logsqueries.spec.js)

Test Results:
- All 4 tests passing in sequential execution (3.4m total)
- Bug #8349: 26s | Bug #7468: 56s | Bug #9475: 53s | Bug #9877: 40s

POM Improvements:
- getStreamDisplayElement(), expectStreamDisplayVisible()
- getStreamDisplayText(), getStreamDisplayStyles()
- hoverStreamDisplay(), isTooltipVisible(), getTooltipText()
- Increased getLogsTableContent() timeout to 30s

GitHub Issues:
- https://github.com/openobserve/openobserve/issues/8349
- https://github.com/openobserve/openobserve/issues/7468
- https://github.com/openobserve/openobserve/issues/9475
- https://github.com/openobserve/openobserve/issues/9877

🤖 Generated with Claude Code


___

### **PR Type**
Tests


___

### **Description**
- Added regression tests for four bug fixes

- Enhanced logsPage.js with stream POM methods

- Cleaned up whitespace in log spec files

- Increased table locator timeout in logsPage.js


___

### Diagram Walkthrough


```mermaid
flowchart LR
  POM["logsPage.js POM enhancements"]
  LogsReg["logs-regression.spec.js tests"]
  StreamsReg["streams-regression.spec.js tests"]
  POM -- "used in tests" --> LogsReg
  POM -- "used in tests" --> StreamsReg
```



<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 multi-stream POM and
tooltip methods</code>&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>Increased <code>getLogsTableContent</code> timeout to 30s<br>
<li> Added stream display methods for multi-stream tests<br> <li>
Implemented tooltip helper methods</ul>


</details>


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

</tr>
</table></td></tr><tr><td><strong>Formatting</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>logspage.spec.js</strong><dd><code>Whitespace cleanup
in logspage spec</code>&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/Logs/logspage.spec.js

- Removed extraneous whitespace


</details>


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

</tr>

<tr>
  <td>
    <details>
<summary><strong>logsqueries.spec.js</strong><dd><code>Whitespace
cleanup in logsqueries spec</code>&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/Logs/logsqueries.spec.js

- Removed extraneous whitespace


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9899/files#diff-c2055f6cef1580b15c5f94f5c8c2e496a6e921332b48bad943bb7c0630846a65">+16/-16</a>&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 logs
regression tests for bugs</code>&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/RegressionSet/logs-regression.spec.js

<ul><li>Added test for SQL <code>_timestamp</code> alias rejection<br>
<li> Added apostrophes display regression tests<br> <li> Added
auto-refresh time range regression test</ul>


</details>


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

</tr>

<tr>
  <td>
    <details>
<summary><strong>streams-regression.spec.js</strong><dd><code>Add
multi-stream ellipsis tooltip tests</code>&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/RegressionSet/streams-regression.spec.js

<ul><li>Added regression test for multi-stream ellipsis tooltip (Bug
#7468)<br> <li> Implemented helper functions for stream ingestion</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9899/files#diff-1c2aad49737186272645ea4cf0f7e3080e28d0c4d8585b3d07edc1889368591d">+166/-0</a>&nbsp;
</td>

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

</details>

___

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-09 12:09:54 +05:30