From 6471d5a756d34386b38d3910743cc3f08d83e383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Thu, 10 Oct 2024 17:35:14 -0300 Subject: [PATCH] test: fix test --- src/library-authoring/component-info/ComponentInfo.test.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 () => {