test: update tests

This commit is contained in:
Arman
2023-02-08 10:04:21 +01:00
parent d676d0d233
commit f4a5bbfb37
+7 -1
View File
@@ -9,8 +9,14 @@ test('shows button', () => {
expect(getByRole('button')).toBeInTheDocument();
});
test('shows link', () => {
render(SecondaryTabsItem, { href: 'https://www.appwrite.io' });
const href = document.querySelector('a');
expect(href).toBeInTheDocument();
});
test('shows button - disabled', () => {
const { getByRole } = render(SecondaryTabsItem, { disabled: true });
const { getByRole } = render(SecondaryTabsItem, { href: null, disabled: true });
expect(getByRole('button')).toBeDisabled();
});