diff --git a/test/e2e/specs/site-editor/hybrid-theme.spec.js b/test/e2e/specs/site-editor/hybrid-theme.spec.js index 3cb9f0685abe5b..bbef68f72eed64 100644 --- a/test/e2e/specs/site-editor/hybrid-theme.spec.js +++ b/test/e2e/specs/site-editor/hybrid-theme.spec.js @@ -19,7 +19,7 @@ test.describe( 'Hybrid theme', () => { ); await expect( - page.getByRole( 'link', { name: 'header' } ) + page.getByText( 'header', { exact: true } ) ).toBeVisible(); } ); @@ -29,7 +29,7 @@ test.describe( 'Hybrid theme', () => { 'postType=wp_template_part&path=/wp_template_part/all' ); - const templatePart = page.getByRole( 'link', { name: 'header' } ); + const templatePart = page.getByText( 'header', { exact: true } ); await expect( templatePart ).toBeVisible(); await templatePart.click();