From b2f3d00b7e2879a07d9580f3f118efbe9f5fb10b Mon Sep 17 00:00:00 2001 From: Carlos Bravo Date: Fri, 22 Apr 2022 09:21:18 +0200 Subject: [PATCH] Remove testid and update tests --- packages/block-library/src/comment-template/edit.js | 6 +----- .../e2e-tests/specs/editor/blocks/comments-query.test.js | 8 +------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/block-library/src/comment-template/edit.js b/packages/block-library/src/comment-template/edit.js index 6027ec3f78e723..a2acb7c6d38d94 100644 --- a/packages/block-library/src/comment-template/edit.js +++ b/packages/block-library/src/comment-template/edit.js @@ -288,11 +288,7 @@ export default function CommentTemplateEdit( { } if ( ! commentTree.length ) { - return ( -

- { __( 'No results found.' ) } -

- ); + return

{ __( 'No results found.' ) }

; } return ( diff --git a/packages/e2e-tests/specs/editor/blocks/comments-query.test.js b/packages/e2e-tests/specs/editor/blocks/comments-query.test.js index 5d706b3cf52108..5f142aee56c75a 100644 --- a/packages/e2e-tests/specs/editor/blocks/comments-query.test.js +++ b/packages/e2e-tests/specs/editor/blocks/comments-query.test.js @@ -28,13 +28,7 @@ describe( 'Comment Query Loop', () => { await trashAllComments(); await createNewPost(); await insertBlock( 'Comments Query Loop' ); - await page.waitForSelector( '[data-testid="noresults"]' ); - expect( - await page.evaluate( - ( el ) => el.innerText, - await page.$( '[data-testid="noresults"]' ) - ) - ).toEqual( 'No results found.' ); + await page.waitForXPath( '//p[contains(text(), "No results found.")]' ); } ); it( 'Pagination links are working as expected', async () => { await createNewPost();