Skip to content

refactor: Update connector-approval e2e selectors to use ARIA roles#850

Merged
dkotter merged 5 commits into
WordPress:developfrom
Infinite-Null:refactor/connector-approval-e2e-locators
Jul 9, 2026
Merged

refactor: Update connector-approval e2e selectors to use ARIA roles#850
dkotter merged 5 commits into
WordPress:developfrom
Infinite-Null:refactor/connector-approval-e2e-locators

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What, Why, and How?

Part of #778

This PR updates the connector-approval E2E tests (tests/e2e/specs/experiments/connector-approval.spec.js) to follow Playwright's recommended best practices. It replaces brittle CSS selectors and DOM structure-dependent locators with resilient, user-facing locators such as getByRole, getByText, and other accessibility-based queries.

Changes

  • Replaced CSS and DOM structure-dependent selectors with Playwright user-facing attributes.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 4.6
Used for: Code review, PR description

Testing Instructions

Verify that CI passes, or run the updated E2E test locally:

npm run test:e2e tests/e2e/specs/experiments/connector-approval.spec.js

Changelog Entry

Developer: Updated connector-approval E2E selectors to use Playwright user-facing attributes.

Open WordPress Playground Preview

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.74%. Comparing base (cf0cb09) to head (c714f2c).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #850   +/-   ##
==========================================
  Coverage      75.74%   75.74%           
  Complexity      2088     2088           
==========================================
  Files             99       99           
  Lines           8630     8630           
==========================================
  Hits            6537     6537           
  Misses          2093     2093           
Flag Coverage Δ
unit 75.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Infinite-Null
Infinite-Null marked this pull request as ready for review July 9, 2026 14:52
@Infinite-Null
Infinite-Null requested a review from a team July 9, 2026 14:52
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@dkotter dkotter added this to the 1.2.0 milestone Jul 9, 2026
@dkotter
dkotter merged commit 33bde34 into WordPress:develop Jul 9, 2026
25 checks passed
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