Skip to content

Fix E2E test selector for navigation link list view selection#74030

Draft
Copilot wants to merge 3 commits intotrunkfrom
copilot/sub-pr-74013
Draft

Fix E2E test selector for navigation link list view selection#74030
Copilot wants to merge 3 commits intotrunkfrom
copilot/sub-pr-74013

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

The E2E test for preserving custom labels when adding URLs to navigation links was failing due to an incorrect selector that searched the entire page instead of scoping to the navigation list view.

Changes

  • Test selector fix: Updated navigation.spec.js to properly access the navigation list view treegrid before selecting the "Empty Link" item
  • Removed duplicate setup: Consolidated openDocumentSettingsSidebar() call since it's now needed earlier in the test flow
// Before: searching entire page
await page.getByRole('link', { name: 'Empty Link' }).click();

// After: scoped to list view treegrid
const listView = page.getByRole('treegrid', {
  name: 'Block navigation structure',
  description: 'Structure for navigation menu: Test Menu',
});
await listView.getByRole('link', { name: 'Empty Link' }).click();

The underlying implementation in use-handle-link-change.js correctly preserves custom labels by conditionally including the title only when no label exists.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Contributor Author

Copilot AI commented Dec 16, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • translate.wordpress.org
    • Triggering command: /usr/local/bin/node node i18n-cache/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix LinkPicker to preserve custom label when adding URL Fix E2E test selector for navigation link list view selection Dec 16, 2025
Copilot AI requested a review from getdave December 16, 2025 09:32
Base automatically changed from fix/link-picker-overwriting-title to trunk December 16, 2025 17:19
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.

3 participants