Merge pull request #9996 from AlexSCorey/RemoveSnapShots

Removes Snapshot tests

SUMMARY
Removes snapshot tests
ISSUE TYPE
COMPONENT NAME

UI

AWX VERSION



ADDITIONAL INFORMATION

Reviewed-by: Michael Abashian <None>
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-04-23 15:08:29 +00:00 committed by GitHub
commit 8e579b2e74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);
});
});