Skip to content

Commit 74ee684

Browse files
committed
test: add test "should not render file upload button if uploads are disabled"
1 parent 950689a commit 74ee684

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/MessageInput/__tests__/EditMessageForm.test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,15 +749,17 @@ describe(`EditMessageForm`, () => {
749749
describe('Uploads disabled', () => {
750750
const channelData = { channel: { own_capabilities: [] } };
751751

752-
it('should render file upload button disabled', async () => {
752+
it('should not render file upload button if uploads are disabled', async () => {
753753
const { customChannel, customClient } = await setup({
754754
channelData,
755755
});
756756
const { container } = await renderComponent({
757757
customChannel,
758758
customClient,
759759
});
760-
await waitFor(() => expect(screen.getByTestId(FILE_INPUT_TEST_ID)).toBeDisabled());
760+
await waitFor(() =>
761+
expect(screen.queryByTestId(FILE_INPUT_TEST_ID)).not.toBeInTheDocument(),
762+
);
761763
const results = await axe(container);
762764
expect(results).toHaveNoViolations();
763765
});

0 commit comments

Comments
 (0)