Removes Snapshot tests

This commit is contained in:
Alex Corey 2021-04-22 16:44:54 -04:00
parent bcbf0bac8c
commit 4d339fe275
8 changed files with 18 additions and 19793 deletions

View File

@ -42,7 +42,6 @@ describe('<NotificationListItem canToggleNotifications />', () => {
</tbody>
</table>
);
expect(wrapper.find('NotificationListItem')).toMatchSnapshot();
expect(wrapper.find('Switch').length).toBe(3);
});

View File

@ -46,7 +46,6 @@ describe('<ToolbarDeleteButton />', () => {
<ToolbarDeleteButton onDelete={() => {}} itemsToDelete={[]} />
);
expect(wrapper.find('button')).toHaveLength(1);
expect(wrapper.find('ToolbarDeleteButton')).toMatchSnapshot();
});
test('should open confirmation modal', async () => {

View File

@ -24,6 +24,5 @@ describe('<DeleteRoleConfirmationModal />', () => {
/>
);
wrapper.update();
expect(wrapper.find('DeleteRoleConfirmationModal')).toMatchSnapshot();
});
});

View File

@ -1,6 +1,10 @@
import React from 'react';
import { act } from 'react-dom/test-utils';
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
import {
mountWithContexts,
waitForElement,
} from '../../../testUtils/enzymeHelpers';
import ResourceAccessListItem from './ResourceAccessListItem';
@ -29,13 +33,18 @@ const accessRecord = {
};
describe('<ResourceAccessListItem />', () => {
test('initially renders successfully', () => {
const wrapper = mountWithContexts(
<ResourceAccessListItem
accessRecord={accessRecord}
onRoleDelete={() => {}}
/>
);
expect(wrapper.find('ResourceAccessListItem')).toMatchSnapshot();
test('initially renders successfully', async () => {
let wrapper;
await act(async () => {
wrapper = mountWithContexts(
<ResourceAccessListItem
accessRecord={accessRecord}
onRoleDelete={() => {}}
/>
);
});
waitForElement(wrapper, 'ResourceAccessListItem', el => el.length > 0);
});
});