diff --git a/test/e2e/specs/editor/various/contrast-checker.spec.js b/test/e2e/specs/editor/various/contrast-checker.spec.js index 8c0de2696c3b4a..d8a81dece11243 100644 --- a/test/e2e/specs/editor/various/contrast-checker.spec.js +++ b/test/e2e/specs/editor/various/contrast-checker.spec.js @@ -19,10 +19,10 @@ test.describe( 'ContrastChecker', () => { } ); await page.getByRole( 'button', { name: 'Text', exact: true } ).click(); - await page.getByLabel( 'Black' ).click(); + await page.getByRole( 'option', { name: 'Black' } ).click(); await page.getByRole( 'button', { name: 'Background' } ).click(); - await page.getByLabel( 'Black' ).click(); + await page.getByRole( 'option', { name: 'Black' } ).click(); const lowContrastWarning = page.locator( '.block-editor-contrast-checker'