Skip to content

Fix e2e auth logic + add namespace a11y playwright tests #3144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

vyncent-t
Copy link
Contributor

@vyncent-t vyncent-t commented Apr 18, 2025

Description

This PR improves accessibility testing coverage and reliability of Playwright E2E tests in the project.

Note: this also fixes some e2e test failures for my other branches, once this is merged in I will drop the duplicates in the other branches.

Accessibility Enhancements

  • Adds @axe-core/playwright integration to the Namespaces Playwright test to perform automated A11Y checks.
  • Introduces accessibility assertions to verify that no critical violations occur before and after creating a namespace.
  • Fixes an issue detected by these tests: the "Create" button lacked an accessible label. This was resolved by adding an aria-label to ensure compliance with screen reader standards.

Navigation & Auth Logic Improvements

  • Updates the navigation and authentication logic used in our Playwright E2E test setup.
    (Previously, navigation during multi-cluster testing was unreliable and prone to hanging or timing out due to race conditions and cluster token loading delays.)
  • The logic has been refactored to work consistently in both CI and local testing environments, with better handling of cluster contexts and token usage.

Notes

  • No issue was filed for this work — these improvements were identified during test development.
  • More accessibility and stability improvements are planned in follow-up PRs to expand coverage across additional areas of the UI.

@vyncent-t vyncent-t added a11y Accessibility related issues e2e-tests End to end tests labels Apr 18, 2025
@vyncent-t vyncent-t self-assigned this Apr 18, 2025
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 18, 2025
@k8s-ci-robot k8s-ci-robot requested review from skoeva and yolossn April 18, 2025 18:09
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 18, 2025
@vyncent-t vyncent-t force-pushed the namespace-a11y-playwright-test branch from cb5bcc1 to 3972d6b Compare April 18, 2025 18:29
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 18, 2025
@vyncent-t vyncent-t force-pushed the namespace-a11y-playwright-test branch 2 times, most recently from 96d736c to f3a977d Compare April 22, 2025 19:47
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 22, 2025
@vyncent-t vyncent-t force-pushed the namespace-a11y-playwright-test branch from f3a977d to 7303bd1 Compare April 22, 2025 19:49
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 22, 2025
@vyncent-t vyncent-t force-pushed the namespace-a11y-playwright-test branch from 7303bd1 to 89d528a Compare April 22, 2025 19:55
@vyncent-t vyncent-t marked this pull request as ready for review April 22, 2025 20:19
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2025
@k8s-ci-robot k8s-ci-robot requested review from ashu8912 and sniok April 22, 2025 20:19
Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.

I just requested one change to the aria-label to use the existing title translation.

@vyncent-t vyncent-t force-pushed the namespace-a11y-playwright-test branch from 89d528a to 93e7825 Compare April 23, 2025 14:08
since we now use a multi cluster structure to run our tests,
the cluster navigation step must be its own full nav step, different from navigateToPage, if it is tied to an auth step.

Signed-off-by: Vincent T <[email protected]>
Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thank you!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: illume, vyncent-t

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 24, 2025
@illume illume merged commit a3bc796 into kubernetes-sigs:main Apr 24, 2025
11 of 12 checks passed
@illume illume added this to the v0.31.0 milestone Apr 24, 2025
@joaquimrocha joaquimrocha moved this from Queued to Done in Headlamp Release Plan / Roadmap Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility related issues approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. e2e-tests End to end tests size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants