## 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.
## 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>