Files
openobserve/tests/ui-testing
Shrinath RaoandClaude Fable 5 79c524c7f9 test: heal dark-mode detection and logs scroll-container selectors after design-token migration (#13316)
## Why

The 2026-07-21 scheduled Playwright Regression runs failed on **both**
OSS ([run
29801668855](https://github.com/openobserve/openobserve/actions/runs/29801668855))
and ENT ([run
29801639539](https://github.com/openobserve/o2-enterprise/actions/runs/29801639539))
— same 4 tests, same shards (Traces-Regression, Logs-Regression).

Root cause: the design-token migration (#13173, `f15e27e5fd`, merged
2026-07-20 evening — the only code change between the last green
scheduled run and the failing one) removed Quasar entirely, breaking two
page-object seams:

| Failing test | Broken seam |
|---|---|
| `traces-bugs.spec.js` › trace values should be visible on hover in
dark mode (@bug-4151) | `homePage.isDarkMode()` read the retired Quasar
`body--dark` class on `<body>`. Dark mode is now the `.dark` class on
`<html>` (set by `utils/theme.ts`). `themePage.js` was already migrated
inside #13173 — `homePage.js` was missed. |
| `logs-9044-7354.spec.js` › all 3 scroll-retention tests (#9044) |
`getScrollContainerPosition()` / `scrollToResultsBottom()` navigated
`pagination → .search-list → [class*="overflow-y-auto"]` — both hooks
are gone. The results scroller is now the combined scroll area
(`ref="scrollContainerRef"` in `logs/SearchResult.vue`). Helpers
returned the `-1` "not found" sentinel, so
`expect(scroll).toBeGreaterThan(10)` failed. |

## What

Test-side only (no `web/` changes):
- `homePage.isDarkMode()` → checks
`document.documentElement.classList.contains('dark')`.
- Logs scroll helpers → walk up from the `logs-search-result-pagination`
anchor and pick the sibling child whose **computed** `overflow-y` is
`auto`/`scroll`, so future utility-class renames don't break it again.

Pagination helpers (`-page-N`, `-next`, `aria-current="page"`) already
matched the new OPagination markup and needed no change.

## ENT

ENT overrides none of these files — its regression workflow checks out
OSS tests (`cp -r o2-enterprise/tests/* openobserve/tests/` overlays
only ENT-owned files). The ENT scheduled run heals automatically once
this merges; verified pre-merge by dispatching ENT
`playwright_regression.yml` with `oss_branch:
test/heal-dark-mode-scroll-selectors`.

## Verification

All 4 previously-failing tests pass locally against a post-migration
build (`main` @ `c523d0034c`, enterprise features):
- `logs-9044-7354.spec.js` — 3 passed (49s)
- `traces-bugs.spec.js -g "trace values should be visible on hover in
dark mode"` — 1 passed (18s)

OSS + ENT regression runs seeded against this branch (links in
comments).

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

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 07:07:47 +00:00
..
2024-11-13 15:13:36 +05:30

zinc-observe-ui-automation

Playwright UI Testing

Installation

npm install

Running Tests

cd playwright-runner
npm start

Then open http://localhost:3000 to access the test runner interface.

Using Command Line

# Run all tests
npx playwright test

# Run specific test by tag
npx playwright test -g @alertsImportExport

# Run in headed mode
npx playwright test --headed

# Run specific test file
npx playwright test Alerts/alerts-import.spec.js

Environment Configuration

Tests can be configured using:

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