Skip to content

feat(e2e): strict oxlint, oxfmt, and type-aware linting#5002

Merged
schultzp2020 merged 13 commits into
mainfrom
feat/e2e-oxc-toolchain
Jun 24, 2026
Merged

feat(e2e): strict oxlint, oxfmt, and type-aware linting#5002
schultzp2020 merged 13 commits into
mainfrom
feat/e2e-oxc-toolchain

Conversation

@schultzp2020

@schultzp2020 schultzp2020 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

PR 2 in the E2E modernization stack (after merged #5000).

  • Migrate e2e-tests/ from ESLint + Prettier + tsc:check to oxlint (type-aware + type-check) and oxfmt
  • Enable strict TypeScript in e2e-tests/tsconfig.json and fix ~235 type errors across specs and utilities
  • Add strict oxlint plugins (import, node, promise) with suspicious-as-error categories; promote Playwright and unsafe-* rules to error
  • Wire Playwright lint rules via eslint-plugin-playwright and file naming via eslint-plugin-check-file
  • Add waitForConfigReconciled() in RHDHDeployment and remove hard waitForTimeout calls from auth-provider specs
  • Derive locale and audit-log types from as const tuples (single source of truth)
  • Regression fixes from the lint migration: Playwright testInfo hook destructuring, audit-log parsing, card scoping, helper-based assertions
  • Update e2e-tests-lint.yaml and lint-staged; add yarn test:list to CI so Playwright collection regressions fail in GHA

Merge order

  1. fix(ci): hygiene — working-directory, lint gaps, and cleanup #5000 — CI hygiene (merged)
  2. This PR — OXC toolchain (feat/e2e-oxc-toolchain)
  3. feat(e2e): enable oxlint pedantic category #5003 — oxlint pedantic
  4. feat(e2e): harden browser lifecycle, smoke gate, and RHDH naming #5004 — e2e hardening

Test plan

  • cd e2e-tests && yarn lint — 0 errors
  • cd e2e-tests && yarn fmt:check — clean
  • cd e2e-tests && yarn test:list — Playwright collects all specs
  • CI e2e-tests-lint and Prow e2e jobs green

Notes

  • TypeScript 6.0.3 (TS 7 RC blocked by Yarn compat patch on Windows)
  • strict: true in e2e-tests tsconfig; type-aware oxlint rules enforce safety without a separate tsc:check step

@openshift-ci openshift-ci Bot requested review from josephca and rm3l June 23, 2026 17:11
@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@schultzp2020 schultzp2020 force-pushed the feat/e2e-oxc-toolchain branch from 390f0e8 to 782f16b Compare June 23, 2026 18:25
@schultzp2020 schultzp2020 changed the base branch from fix/ci-hygiene to main June 23, 2026 18:26
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.77%. Comparing base (65bcea6) to head (a4cc1b8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5002      +/-   ##
==========================================
- Coverage   55.39%   54.77%   -0.62%     
==========================================
  Files         122      110      -12     
  Lines        2365     2147     -218     
  Branches      539      537       -2     
==========================================
- Hits         1310     1176     -134     
+ Misses       1049      969      -80     
+ Partials        6        2       -4     
Flag Coverage Δ
rhdh 54.77% <ø> (-0.62%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65bcea6...a4cc1b8. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@openshift-ci openshift-ci Bot added lgtm and removed lgtm labels Jun 24, 2026
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

Replace ESLint, Prettier, and tsc:check with oxlint --type-aware --type-check
and oxfmt in e2e-tests. Add waitForConfigReconciled() for auth provider rollout
waits and remove hard waitForTimeout usage across specs and helpers.

Co-authored-by: Cursor <cursoragent@cursor.com>
schultzp2020 and others added 11 commits June 24, 2026 11:24
Set strict: true in e2e-tests tsconfig and fix ~235 type errors across
specs and utilities with proper guards, error helpers, and typing.

Co-authored-by: Cursor <cursoragent@cursor.com>
Map existing yarn scripts to oxlint and oxfmt so docs, CI, and lint-staged
keep using lint:check, lint:fix, prettier:check, prettier:fix, and tsc:check.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use lint/lint:fix and fmt/fmt:check script names, remove tsc and legacy
prettier script aliases. Type-aware settings remain in oxlint.config.ts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add import, node, and promise plugins with suspicious-as-error categories,
promote Playwright and type-aware unsafe-* rules to error, and fix the
resulting violations across helpers, specs, and support code.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use single-source-of-truth const tuples for Locale and audit log enums,
and loop LOCALES when merging translation bundles.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Oxlint no-empty-pattern conflicted with Playwright's required `{}` callback
shape; the _args workaround passed lint but broke test collection in Prow.
Disable no-empty-pattern for spec files and add yarn test:list to GHA.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore Log stack parsing dropped by the typed constructor refactor,
use .first() for ambiguous increment buttons after locator migration,
and revert annotator catalog check to verifyText which handles duplicates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Revert application-provider to per-card DOM selectors that avoid strict
mode on shared article headings, and stop expecting undefined from
registerExistingComponent which returns a boolean.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ators

Replace file-level no-raw-locators override with a scoped block comment
next to the nested div card selectors, matching repo convention.

Co-authored-by: Cursor <cursoragent@cursor.com>
Await whitelisted POM helpers directly instead of expect().resolves.toBeUndefined(),
revert inline locators to uiHelper.verify* where helpers encode strictness,
and drop redundant post-YAML expects covered by inspectEntityAndVerifyYaml.

Co-authored-by: Cursor <cursoragent@cursor.com>
@schultzp2020 schultzp2020 force-pushed the feat/e2e-oxc-toolchain branch from b499d8d to 31ffed4 Compare June 24, 2026 16:26
@github-actions

Copy link
Copy Markdown
Contributor

The container image build workflow finished with status: cancelled.

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

Use Oxfmt-recommended defaults (printWidth 100, sortPackageJson) and
enable sortImports. Reformat the full e2e-tests tree so fmt:check stays green.

Co-authored-by: Cursor <cursoragent@cursor.com>
@schultzp2020

Copy link
Copy Markdown
Contributor Author

Merging as the last run was green and the only new change is to enable import sorting.

@schultzp2020 schultzp2020 merged commit 256a5f9 into main Jun 24, 2026
10 of 12 checks passed
@schultzp2020 schultzp2020 deleted the feat/e2e-oxc-toolchain branch June 24, 2026 17:53
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Image was built and published successfully. It is available at:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants