Files
openobserve/tests/ui-testing/playwright-tests/Functions
Vamsi Karthik RandClaude Opus 4.8 38e944529d test: unblock alpha1 cloud E2E suite — shared setup fixes + Functions (#13155)
## What

Repairs the shared setup + ingestion path that was failing **every**
module of the alpha1 cloud E2E suite (`playwright_alpha1.yml`) after the
UX revamp, **and stabilizes the first full test shard — Functions — to
green** (validated in CI, run link below). No changes to the test
matrix.

Per-module fixes for the remaining shards land in separate follow-up
PRs.

## Root cause — shared setup (blocked all 13 modules)

1. **Automation login user routes through Okta.** After the revamp,
`@openobserve.ai` logins on alpha redirect to Okta SSO and 404 —
automation can't complete login. The local-auth `e2etest@o2-qa.com` user
still uses the Dex password flow.

2. **Org-switch selectors changed** (`global-setup-alpha1.js`). The org
dropdown now opens via a dedicated trigger button; the old inline
`arrow_drop_down` text is an SVG icon, the search box's `data-test`
moved to the `OSearchInput` wrapper `<div>`, and rows carry a
`data-test-org-identifier`.

3. **Ingestion helper rejected https.** `ingestionPage.js` hardcoded an
`http.Agent` for node-fetch — throws `Protocol "https:" not supported`
against alpha's https ingestion URL (killed ~27 tests/run across
modules).

## Root cause — Functions shard

4. **Tests created enrichment tables in the wrong org.**
`navigateToBase` passes `?org_identifier=` on the root URL; the redirect
to `/web/` **drops the query param**, so the app fell back to the user's
default org and enrichment tables were created there. Fixed by
deep-navigating to the enrichment page with the org param and asserting
the active org stuck (same pattern js-transform tests already use).

5. **Backend bug (reported separately): enrichment URL-jobs fail for
table names starting with `schema`.** 100% reproducible,
org/session/timing-independent: the job's save step fails with `Failed
to save batch 1: not an ingester` (`schema_probe1` ❌ / `view_probe1` ✅,
same request otherwise). Test tables renamed `schema_view_*` →
`view_schema_*` and `schema_mismatch_*` → `mismatch_schema_*`; cleanup
patterns cover both prefixes. The product bug itself still needs a
backend fix — it affects any user naming a table `schema…`.

Plus hardening while there: URL-job completion is now decided from the
backend status API instead of inferring from row-button counts (which
misread a failed job as success), the job's `error_message` is logged on
failure, and the create form verifies field values + Save enabled +
create-API response before proceeding.

## Validation

- **CI (this PR's branch): [run
#168](https://github.com/openobserve/o2-enterprise/actions/runs/29315765982)
— Cloud ✅ (3m31s) + Functions ✅ (13m14s), `playwright_summary` ✅**
- Local (alpha, CI conditions): previously-failing schema-view +
schema-mismatch tests 2/2 green; earlier full-shard run 24/25 with the
same single failure now fixed.

## Notes

- `ALPHA1_USER_*` secrets: CI already uses a working non-Okta user
(Cloud job green).
- Follow-ups: backend `schema`-prefix bug (separate report), per-module
PRs for remaining shards.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 06:58:55 +00:00
..