Skip to content

fix: stabilize algorithm picker e2e.#940

Open
jonathanp-okta wants to merge 3 commits into
masterfrom
fix/stabilize-algorithm-picker-e2e
Open

fix: stabilize algorithm picker e2e.#940
jonathanp-okta wants to merge 3 commits into
masterfrom
fix/stabilize-algorithm-picker-e2e

Conversation

@jonathanp-okta

@jonathanp-okta jonathanp-okta commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.

Description

Fixes a race condition in the Playwright E2E tests for the decoder and encoder "generate JWT example" workflows.

The algorithm picker performs asynchronous WebCrypto capability checks for P-521, Ed25519, and Ed448. Previously, each check updated component state independently. These updates rebuilt the options passed to react-select while Playwright was interacting with the open menu. As a result, Playwright could resolve an option and then lose it when the option was replaced in the DOM, producing element is not stable and element was detached from the DOM timeouts.

The fix runs the capability checks concurrently with Promise.all and applies their results in a single state update. The algorithm picker exposes its loading state through aria-busy, allowing the E2E setup to wait until capability detection is complete before opening the menu. The option locators remain scoped to the visible listbox.

The PR also corrects the Playwright trace artifact path in the test workflow. Traces are written under test-results, not playwright-report, so failed CI runs will now upload the generated trace files correctly.

Scope is limited to algorithm-picker initialization, the related decoder and encoder E2E setup hooks, and CI trace collection. Selection behavior, algorithm ordering, labels, and styling are unchanged.

References

N/A

Testing

  • Automated E2E verification: all 28 affected Chromium decoder and encoder algorithm-example tests passed serially with one worker.

  • Type and editor verification: no diagnostics were reported in the modified component or E2E files.

  • Manual verification: confirmed that the algorithm picker opens and selects examples correctly in both Decoder and Encoder views.

  • CI should verify the same workflows across Chromium and Firefox without relying on retries.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@jonathanp-okta jonathanp-okta self-assigned this Jul 22, 2026
@github-actions

Copy link
Copy Markdown

Preview URL https://next-jwt-h8r4yyddo-okta.vercel.app

@github-actions

Copy link
Copy Markdown

Preview URL https://next-jwt-pa8wkgag1-okta.vercel.app

@jonathanp-okta
jonathanp-okta marked this pull request as ready for review July 22, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant