From 48e7b83e72955290f6d81599b0abff901e16f992 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Fri, 10 Jan 2025 16:25:27 +0100 Subject: [PATCH] Adjust one more test. --- .../src/components/colors-gradients/test/control.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/colors-gradients/test/control.js b/packages/block-editor/src/components/colors-gradients/test/control.js index 19640d41daeb3..4c389acda1117 100644 --- a/packages/block-editor/src/components/colors-gradients/test/control.js +++ b/packages/block-editor/src/components/colors-gradients/test/control.js @@ -51,7 +51,7 @@ describe( 'ColorPaletteControl', () => { ).toBeInTheDocument(); // Is showing the two predefined Colors. - expect( screen.getAllByLabelText( /^Color:/ ) ).toHaveLength( 2 ); + expect( screen.getAllByRole( 'option' ) ).toHaveLength( 2 ); } ); it( 'renders the color picker and does not render tabs if it is only possible to select a color', async () => { @@ -80,7 +80,7 @@ describe( 'ColorPaletteControl', () => { ).not.toBeInTheDocument(); // Is showing the two predefined Colors. - expect( screen.getAllByLabelText( /^Color:/ ) ).toHaveLength( 2 ); + expect( screen.getAllByRole( 'option' ) ).toHaveLength( 2 ); } ); it( 'renders the gradient picker and does not render tabs if it is only possible to select a gradient', async () => {