Skip to content

Commit

Permalink
test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 10, 2024
1 parent 9a4a697 commit 6471d5a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/library-authoring/component-info/ComponentInfo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,14 @@ describe('<ComponentInfo> 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(
<ComponentInfo />,
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 () => {
Expand Down

0 comments on commit 6471d5a

Please sign in to comment.