diff --git a/src/library-authoring/component-info/ComponentInfo.test.tsx b/src/library-authoring/component-info/ComponentInfo.test.tsx index 57acb2b2b..e54c83c05 100644 --- a/src/library-authoring/component-info/ComponentInfo.test.tsx +++ b/src/library-authoring/component-info/ComponentInfo.test.tsx @@ -44,15 +44,14 @@ describe(' Sidebar', () => { expect(editButton).toBeDisabled(); }); - it('should show a disabled "Edit" button when the library is read-only', async () => { + it('should not show a "Edit" button when the library is read-only', async () => { initializeMocks(); render( , withLibraryId(mockContentLibrary.libraryIdReadOnly, mockLibraryBlockMetadata.usageKeyPublished), ); - const editButton = await screen.findByRole('button', { name: /Edit component/ }); - expect(editButton).toBeDisabled(); + expect(screen.queryByRole('button', { name: /Edit component/ })).not.toBeInTheDocument(); }); it('should show a working "Edit" button for a normal component', async () => {