From b4ce14c22508d25429b8f4cfe08394940d637b92 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Fri, 22 Jan 2021 12:25:02 -0500 Subject: [PATCH] Fix tests --- .../components/downloadable-block-list-item/test/index.js | 6 +++--- packages/e2e-test-utils/src/inserter.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/block-directory/src/components/downloadable-block-list-item/test/index.js b/packages/block-directory/src/components/downloadable-block-list-item/test/index.js index f0f3d6d1fb88a0..8d9b1b60401e42 100644 --- a/packages/block-directory/src/components/downloadable-block-list-item/test/index.js +++ b/packages/block-directory/src/components/downloadable-block-list-item/test/index.js @@ -36,7 +36,7 @@ describe( 'DownloadableBlockListItem', () => { expect( description ).not.toBeNull(); } ); - it( 'should show a spinner when installing the block', () => { + it( 'should show installing status when installing the block', () => { useSelect.mockImplementation( () => ( { isInstalling: true, isInstallable: true, @@ -45,8 +45,8 @@ describe( 'DownloadableBlockListItem', () => { const { queryByText } = render( ); - const spinner = queryByText( `Installing ${ plugin.title }` ); - expect( spinner ).not.toBeNull(); + const statusLabel = queryByText( 'Installing…' ); + expect( statusLabel ).not.toBeNull(); } ); it( "should be disabled when a plugin can't be installed", () => { diff --git a/packages/e2e-test-utils/src/inserter.js b/packages/e2e-test-utils/src/inserter.js index ced1e67e2384ff..4763e99f3f10ea 100644 --- a/packages/e2e-test-utils/src/inserter.js +++ b/packages/e2e-test-utils/src/inserter.js @@ -188,7 +188,7 @@ export async function insertBlockDirectoryBlock( searchTerm ) { // Grab the first block in the list const insertButton = await page.waitForSelector( - '.block-directory-downloadable-blocks-list div:first-child button' + '.block-directory-downloadable-blocks-list button:first-child' ); await insertButton.click(); // We should wait until the inserter closes and the focus moves to the content.