From 39e366184396025853401cb565e9b0aa276c2c4a Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Wed, 25 Feb 2026 15:38:52 -0600 Subject: [PATCH 1/4] Update tests; handle terms lists, as well --- src/wp-admin/includes/class-wp-terms-list-table.php | 4 +--- tests/e2e/specs/edit-posts.test.js | 6 +++--- tests/e2e/specs/empty-trash-restore-trashed-posts.test.js | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php index 7537a499974d5..75e37e45d5c4f 100644 --- a/src/wp-admin/includes/class-wp-terms-list-table.php +++ b/src/wp-admin/includes/class-wp-terms-list-table.php @@ -413,10 +413,8 @@ public function column_name( $tag ) { $edit_link ); $name = sprintf( - '%s', + '%s', esc_url( $edit_link ), - /* translators: %s: Taxonomy term name. */ - esc_attr( sprintf( __( '“%s” (Edit)' ), $tag->name ) ), $name ); } diff --git a/tests/e2e/specs/edit-posts.test.js b/tests/e2e/specs/edit-posts.test.js index 0e2eb3687f778..8cc3d8063412b 100644 --- a/tests/e2e/specs/edit-posts.test.js +++ b/tests/e2e/specs/edit-posts.test.js @@ -53,7 +53,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // Click the post title (edit) link - await listTable.getByRole( 'link', { name: `“${ title }” (Edit)` } ).click(); + await listTable.getByRole( 'link', { name: `${ title }` } ).click(); // Wait for the editor iframe to load, and switch to it as the active content frame. await page @@ -84,7 +84,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // // Focus on the post title link. - await listTable.getByRole( 'link', { name: `“${ title }” (Edit)` } ).focus(); + await listTable.getByRole( 'link', { name: `${ title }` } ).focus(); // Tab to the Quick Edit button and press Enter to quick edit. await pageUtils.pressKeys( 'Tab', { times: 2 } ) @@ -122,7 +122,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // Focus on the post title link. - await listTable.getByRole( 'link', { name: `“${ title }” (Edit)` } ).focus(); + await listTable.getByRole( 'link', { name: `${ title }` } ).focus(); // Tab to the Trash button and press Enter to delete the post. await pageUtils.pressKeys( 'Tab', { times: 3 } ) diff --git a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js index d970ca09b1c90..de5f4bc2c6412 100644 --- a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js +++ b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js @@ -20,7 +20,7 @@ test.describe( 'Empty Trash', () => { await expect( listTable ).toBeVisible(); // Move post to trash - await listTable.getByRole( 'link', { name: `“${ POST_TITLE }” (Edit)` } ).hover(); + await listTable.getByRole( 'link', { name: `${ POST_TITLE }` } ).hover(); await listTable.getByRole( 'link', { name: `Move “${POST_TITLE}” to the Trash` } ).click(); // Empty trash From b170be02aad8d73c028781a6bf85b8b35bcb2454 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Wed, 25 Feb 2026 15:54:52 -0600 Subject: [PATCH 2/4] Change to exact matches --- tests/e2e/specs/edit-posts.test.js | 6 +++--- tests/e2e/specs/empty-trash-restore-trashed-posts.test.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/e2e/specs/edit-posts.test.js b/tests/e2e/specs/edit-posts.test.js index 8cc3d8063412b..1214a052f1f40 100644 --- a/tests/e2e/specs/edit-posts.test.js +++ b/tests/e2e/specs/edit-posts.test.js @@ -53,7 +53,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // Click the post title (edit) link - await listTable.getByRole( 'link', { name: `${ title }` } ).click(); + await listTable.getByRole( 'link', { name: `${ title }`, exact: true } ).click(); // Wait for the editor iframe to load, and switch to it as the active content frame. await page @@ -84,7 +84,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // // Focus on the post title link. - await listTable.getByRole( 'link', { name: `${ title }` } ).focus(); + await listTable.getByRole( 'link', { name: `${ title }`, exact: true } ).focus(); // Tab to the Quick Edit button and press Enter to quick edit. await pageUtils.pressKeys( 'Tab', { times: 2 } ) @@ -122,7 +122,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // Focus on the post title link. - await listTable.getByRole( 'link', { name: `${ title }` } ).focus(); + await listTable.getByRole( 'link', { name: `${ title }`, exact: true } ).focus(); // Tab to the Trash button and press Enter to delete the post. await pageUtils.pressKeys( 'Tab', { times: 3 } ) diff --git a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js index de5f4bc2c6412..3ba7983ed03c9 100644 --- a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js +++ b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js @@ -20,7 +20,7 @@ test.describe( 'Empty Trash', () => { await expect( listTable ).toBeVisible(); // Move post to trash - await listTable.getByRole( 'link', { name: `${ POST_TITLE }` } ).hover(); + await listTable.getByRole( 'link', { name: `${ POST_TITLE }`, exact: true } ).hover(); await listTable.getByRole( 'link', { name: `Move “${POST_TITLE}” to the Trash` } ).click(); // Empty trash From 78e158cf8984a8d20f43a5c8683121466b8cb689 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Wed, 25 Feb 2026 16:04:12 -0600 Subject: [PATCH 3/4] Overlooked instance --- tests/e2e/specs/empty-trash-restore-trashed-posts.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js index 3ba7983ed03c9..56788461494ce 100644 --- a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js +++ b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js @@ -40,7 +40,7 @@ test.describe( 'Empty Trash', () => { await expect( listTable ).toBeVisible(); // Move post to trash - await listTable.getByRole( 'link', { name: `“${ POST_TITLE }” (Edit)` } ).hover(); + await listTable.getByRole( 'link', { name: `${ POST_TITLE }`, exact: true } ).hover(); await listTable.getByRole( 'link', { name: `Move “${POST_TITLE}” to the Trash` } ).click(); await page.getByRole( 'link', { name: 'Trash' } ).click(); From a3103f2fd8bac088b0a2a2145518d491ac1f787b Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Wed, 25 Feb 2026 16:32:20 -0600 Subject: [PATCH 4/4] Extra braces no longer required. --- tests/e2e/specs/edit-posts.test.js | 6 +++--- tests/e2e/specs/empty-trash-restore-trashed-posts.test.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/e2e/specs/edit-posts.test.js b/tests/e2e/specs/edit-posts.test.js index 1214a052f1f40..9b8cd37c60e50 100644 --- a/tests/e2e/specs/edit-posts.test.js +++ b/tests/e2e/specs/edit-posts.test.js @@ -53,7 +53,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // Click the post title (edit) link - await listTable.getByRole( 'link', { name: `${ title }`, exact: true } ).click(); + await listTable.getByRole( 'link', { name: title, exact: true } ).click(); // Wait for the editor iframe to load, and switch to it as the active content frame. await page @@ -84,7 +84,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // // Focus on the post title link. - await listTable.getByRole( 'link', { name: `${ title }`, exact: true } ).focus(); + await listTable.getByRole( 'link', { name: title, exact: true } ).focus(); // Tab to the Quick Edit button and press Enter to quick edit. await pageUtils.pressKeys( 'Tab', { times: 2 } ) @@ -122,7 +122,7 @@ test.describe( 'Edit Posts', () => { await expect( listTable ).toBeVisible(); // Focus on the post title link. - await listTable.getByRole( 'link', { name: `${ title }`, exact: true } ).focus(); + await listTable.getByRole( 'link', { name: title, exact: true } ).focus(); // Tab to the Trash button and press Enter to delete the post. await pageUtils.pressKeys( 'Tab', { times: 3 } ) diff --git a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js index 56788461494ce..5f71ff2e415c5 100644 --- a/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js +++ b/tests/e2e/specs/empty-trash-restore-trashed-posts.test.js @@ -20,7 +20,7 @@ test.describe( 'Empty Trash', () => { await expect( listTable ).toBeVisible(); // Move post to trash - await listTable.getByRole( 'link', { name: `${ POST_TITLE }`, exact: true } ).hover(); + await listTable.getByRole( 'link', { name: POST_TITLE, exact: true } ).hover(); await listTable.getByRole( 'link', { name: `Move “${POST_TITLE}” to the Trash` } ).click(); // Empty trash @@ -40,7 +40,7 @@ test.describe( 'Empty Trash', () => { await expect( listTable ).toBeVisible(); // Move post to trash - await listTable.getByRole( 'link', { name: `${ POST_TITLE }`, exact: true } ).hover(); + await listTable.getByRole( 'link', { name: POST_TITLE, exact: true } ).hover(); await listTable.getByRole( 'link', { name: `Move “${POST_TITLE}” to the Trash` } ).click(); await page.getByRole( 'link', { name: 'Trash' } ).click();