From 3173848fc8e426c7a18cdf9d57a963fa8b42949c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Fri, 1 Dec 2023 17:48:27 +0100 Subject: [PATCH] DataViews: set proper role for AddFilter's items (#56714) --- packages/edit-site/src/components/dataviews/add-filter.js | 2 -- test/e2e/specs/site-editor/new-templates-list.spec.js | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/edit-site/src/components/dataviews/add-filter.js b/packages/edit-site/src/components/dataviews/add-filter.js index 4dbbf7dc0938d..a4b9bf42a4d78 100644 --- a/packages/edit-site/src/components/dataviews/add-filter.js +++ b/packages/edit-site/src/components/dataviews/add-filter.js @@ -81,8 +81,6 @@ export default function AddFilter( { fields, view, onChangeView } ) { { filter.elements.map( ( element ) => ( { onChangeView( ( currentView ) => ( { ...currentView, diff --git a/test/e2e/specs/site-editor/new-templates-list.spec.js b/test/e2e/specs/site-editor/new-templates-list.spec.js index b28362cd2c66d..8bb98b6ad5355 100644 --- a/test/e2e/specs/site-editor/new-templates-list.spec.js +++ b/test/e2e/specs/site-editor/new-templates-list.spec.js @@ -66,7 +66,7 @@ test.describe( 'Templates', () => { // Filter by author. await page.getByRole( 'button', { name: 'Add filter' } ).click(); await page.getByRole( 'menuitem', { name: 'Author' } ).hover(); - await page.getByRole( 'menuitemradio', { name: 'admin' } ).click(); + await page.getByRole( 'menuitem', { name: 'admin' } ).click(); await expect( titles ).toHaveCount( 1 ); await expect( titles.first() ).toHaveText( 'Date Archives' ); @@ -77,7 +77,7 @@ test.describe( 'Templates', () => { await expect( titles ).toHaveCount( 3 ); await page.getByRole( 'button', { name: 'Add filter' } ).click(); await page.getByRole( 'menuitem', { name: 'Author' } ).hover(); - await page.getByRole( 'menuitemradio', { name: 'Emptytheme' } ).click(); + await page.getByRole( 'menuitem', { name: 'Emptytheme' } ).click(); await expect( titles ).toHaveCount( 2 ); } ); test( 'Field visibility', async ( { admin, page } ) => {