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
8 changed files with 18 additions and 19793 deletions

View File

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

View File

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

View File

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

View File

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