mirror of
https://github.com/ansible/awx.git
synced 2026-02-19 20:20:06 -03:30
remove 1st batch of unnecessary unmount calls
This commit is contained in:
@@ -31,6 +31,5 @@ describe('<App />', () => {
|
|||||||
});
|
});
|
||||||
expect(wrapper.length).toBe(1);
|
expect(wrapper.length).toBe(1);
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ describe('<AdHocCommands />', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
let wrapper;
|
let wrapper;
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
wrapper.unmount();
|
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ describe('<AdHocCommandsWizard/>', () => {
|
|||||||
});
|
});
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should mount properly', async () => {
|
test('should mount properly', async () => {
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ describe('<AdHocCredentialStep />', () => {
|
|||||||
});
|
});
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should mount properly', async () => {
|
test('should mount properly', async () => {
|
||||||
|
|||||||
@@ -33,9 +33,9 @@ describe('<AdHocExecutionEnvironmentStep />', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should mount properly', async () => {
|
test('should mount properly', async () => {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ describe('<SelectRoleStep />', () => {
|
|||||||
name: 'foo',
|
name: 'foo',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
test('initially renders without crashing', () => {
|
test('initially renders without crashing', () => {
|
||||||
wrapper = shallowWithContexts(
|
wrapper = shallowWithContexts(
|
||||||
<SelectRoleStep
|
<SelectRoleStep
|
||||||
@@ -43,8 +44,8 @@ describe('<SelectRoleStep />', () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
expect(wrapper.length).toBe(1);
|
expect(wrapper.length).toBe(1);
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('clicking role fires onRolesClick callback', () => {
|
test('clicking role fires onRolesClick callback', () => {
|
||||||
const onRolesClick = jest.fn();
|
const onRolesClick = jest.fn();
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
@@ -63,6 +64,5 @@ describe('<SelectRoleStep />', () => {
|
|||||||
name: 'Project Admin',
|
name: 'Project Admin',
|
||||||
description: 'Can manage all projects of the organization',
|
description: 'Can manage all projects of the organization',
|
||||||
});
|
});
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,10 +14,6 @@ describe('PageHeaderToolbar', () => {
|
|||||||
const onAboutClick = jest.fn();
|
const onAboutClick = jest.fn();
|
||||||
const onLogoutClick = jest.fn();
|
const onLogoutClick = jest.fn();
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('expected content is rendered on initialization', async () => {
|
test('expected content is rendered on initialization', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ jest.mock('../../api');
|
|||||||
let wrapper;
|
let wrapper;
|
||||||
|
|
||||||
describe('<CopyButton/>', () => {
|
describe('<CopyButton/>', () => {
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('should mount properly', async () => {
|
test('should mount properly', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
@@ -24,6 +21,7 @@ describe('<CopyButton/>', () => {
|
|||||||
});
|
});
|
||||||
expect(wrapper.find('CopyButton').length).toBe(1);
|
expect(wrapper.find('CopyButton').length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should call the correct function on button click', async () => {
|
test('should call the correct function on button click', async () => {
|
||||||
const copyItem = jest.fn();
|
const copyItem = jest.fn();
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
|
|||||||
@@ -15,13 +15,6 @@ describe('<DataListToolbar />', () => {
|
|||||||
integerFields: ['page', 'page_size'],
|
integerFields: ['page', 'page_size'],
|
||||||
};
|
};
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
if (toolbar) {
|
|
||||||
toolbar.unmount();
|
|
||||||
toolbar = null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const onSearch = jest.fn();
|
const onSearch = jest.fn();
|
||||||
const onReplaceSearch = jest.fn();
|
const onReplaceSearch = jest.fn();
|
||||||
const onSort = jest.fn();
|
const onSort = jest.fn();
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ describe('<DisassociateButton />', () => {
|
|||||||
|
|
||||||
afterAll(() => {
|
afterAll(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render button', () => {
|
test('should render button', () => {
|
||||||
|
|||||||
@@ -15,6 +15,5 @@ describe('<ExpandCollapse />', () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
expect(wrapper.length).toBe(1);
|
expect(wrapper.length).toBe(1);
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ import FieldWithPrompt from './FieldWithPrompt';
|
|||||||
describe('FieldWithPrompt', () => {
|
describe('FieldWithPrompt', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('Required asterisk and Popover hidden when not required and tooltip not provided', () => {
|
test('Required asterisk and Popover hidden when not required and tooltip not provided', () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Formik
|
<Formik
|
||||||
|
|||||||
@@ -5,9 +5,6 @@ import JobListCancelButton from './JobListCancelButton';
|
|||||||
describe('<JobListCancelButton />', () => {
|
describe('<JobListCancelButton />', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('should be disabled when no rows are selected', () => {
|
test('should be disabled when no rows are selected', () => {
|
||||||
wrapper = mountWithContexts(<JobListCancelButton jobsToCancel={[]} />);
|
wrapper = mountWithContexts(<JobListCancelButton jobsToCancel={[]} />);
|
||||||
expect(wrapper.find('JobListCancelButton button').props().disabled).toBe(
|
expect(wrapper.find('JobListCancelButton button').props().disabled).toBe(
|
||||||
|
|||||||
@@ -41,10 +41,6 @@ describe('<JobListItem />', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('initially renders successfully', () => {
|
test('initially renders successfully', () => {
|
||||||
expect(wrapper.find('JobListItem').length).toBe(1);
|
expect(wrapper.find('JobListItem').length).toBe(1);
|
||||||
});
|
});
|
||||||
@@ -118,10 +114,6 @@ describe('<JobListItem with failed job />', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('launch button shown to users with launch capabilities', () => {
|
test('launch button shown to users with launch capabilities', () => {
|
||||||
expect(wrapper.find('LaunchButton').length).toBe(1);
|
expect(wrapper.find('LaunchButton').length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ describe('ListHeader', () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
expect(wrapper.length).toBe(1);
|
expect(wrapper.length).toBe(1);
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should navigate when DataListToolbar calls onSort prop', async () => {
|
test('should navigate when DataListToolbar calls onSort prop', async () => {
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ describe('ApplicationLookup', () => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render successfully', async () => {
|
test('should render successfully', async () => {
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ describe('ExecutionEnvironmentLookup', () => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render successfully', async () => {
|
test('should render successfully', async () => {
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ describe('InventoryLookup', () => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render successfully and fetch data', async () => {
|
test('should render successfully and fetch data', async () => {
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ describe('<Formik><MultiCredentialsLookup /></Formik>', () => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should load credential types', async () => {
|
test('should load credential types', async () => {
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ describe('OrganizationLookup', () => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render successfully', async () => {
|
test('should render successfully', async () => {
|
||||||
|
|||||||
@@ -21,10 +21,6 @@ describe('<NotificationListItem canToggleNotifications />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
if (wrapper) {
|
|
||||||
wrapper.unmount();
|
|
||||||
wrapper = null;
|
|
||||||
}
|
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ describe('<ToolbarDeleteButton />', () => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render button', () => {
|
test('should render button', () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<ToolbarDeleteButton onDelete={() => {}} itemsToDelete={[]} />
|
<ToolbarDeleteButton onDelete={() => {}} itemsToDelete={[]} />
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ describe('PromptProjectDetail', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should render successfully', () => {
|
test('should render successfully', () => {
|
||||||
expect(wrapper.find('PromptProjectDetail')).toHaveLength(1);
|
expect(wrapper.find('PromptProjectDetail')).toHaveLength(1);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -133,7 +133,6 @@ describe('<ResourceAccessList />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
wrapper.unmount();
|
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -113,12 +113,11 @@ describe('<Schedule />', () => {
|
|||||||
});
|
});
|
||||||
await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
|
await waitForElement(wrapper, 'ContentLoading', el => el.length === 0);
|
||||||
});
|
});
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('renders successfully', async () => {
|
test('renders successfully', async () => {
|
||||||
expect(wrapper.length).toBe(1);
|
expect(wrapper.length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('expect all tabs to exist, including Back to Schedules', async () => {
|
test('expect all tabs to exist, including Back to Schedules', async () => {
|
||||||
expect(
|
expect(
|
||||||
wrapper.find('button[link="/templates/job_template/1/schedules"]').length
|
wrapper.find('button[link="/templates/job_template/1/schedules"]').length
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ describe('ScheduleList', () => {
|
|||||||
wrapper.update();
|
wrapper.update();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should fetch schedules from api and render the list', () => {
|
test('should fetch schedules from api and render the list', () => {
|
||||||
expect(loadSchedules).toHaveBeenCalled();
|
expect(loadSchedules).toHaveBeenCalled();
|
||||||
expect(wrapper.find('ScheduleListItem').length).toBe(5);
|
expect(wrapper.find('ScheduleListItem').length).toBe(5);
|
||||||
|
|||||||
@@ -64,10 +64,6 @@ describe('ScheduleListItem', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('Name correctly shown with correct link', () => {
|
test('Name correctly shown with correct link', () => {
|
||||||
expect(
|
expect(
|
||||||
wrapper
|
wrapper
|
||||||
@@ -149,10 +145,6 @@ describe('ScheduleListItem', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('Name correctly shown with correct link', () => {
|
test('Name correctly shown with correct link', () => {
|
||||||
expect(
|
expect(
|
||||||
wrapper
|
wrapper
|
||||||
@@ -217,10 +209,6 @@ describe('ScheduleListItem', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should show missing resource icon', () => {
|
test('should show missing resource icon', () => {
|
||||||
expect(wrapper.find('ExclamationTriangleIcon').length).toBe(1);
|
expect(wrapper.find('ExclamationTriangleIcon').length).toBe(1);
|
||||||
expect(wrapper.find('ScheduleToggle').prop('isDisabled')).toBe(true);
|
expect(wrapper.find('ScheduleToggle').prop('isDisabled')).toBe(true);
|
||||||
|
|||||||
@@ -15,15 +15,15 @@ describe('<ScheduleOccurrences>', () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('Local option initially set', async () => {
|
test('Local option initially set', async () => {
|
||||||
expect(wrapper.find('MultiButtonToggle').props().value).toBe('local');
|
expect(wrapper.find('MultiButtonToggle').props().value).toBe('local');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('It renders the correct number of dates', async () => {
|
test('It renders the correct number of dates', async () => {
|
||||||
expect(wrapper.find('dd').children().length).toBe(2);
|
expect(wrapper.find('dd').children().length).toBe(2);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Clicking UTC button toggles the dates to utc', async () => {
|
test('Clicking UTC button toggles the dates to utc', async () => {
|
||||||
wrapper.find('button[aria-label="UTC"]').simulate('click');
|
wrapper.find('button[aria-label="UTC"]').simulate('click');
|
||||||
expect(wrapper.find('MultiButtonToggle').props().value).toBe('utc');
|
expect(wrapper.find('MultiButtonToggle').props().value).toBe('utc');
|
||||||
@@ -44,6 +44,7 @@ describe('<ScheduleOccurrences>', () => {
|
|||||||
).toBe('3/30/2020, 4:00:00 AM');
|
).toBe('3/30/2020, 4:00:00 AM');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Only one date passed in', () => {
|
describe('Only one date passed in', () => {
|
||||||
test('Component should not render chldren', async () => {
|
test('Component should not render chldren', async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
@@ -55,7 +56,6 @@ describe('<ScheduleOccurrences>', () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
expect(wrapper.find('ScheduleOccurrences').children().length).toBe(0);
|
expect(wrapper.find('ScheduleOccurrences').children().length).toBe(0);
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ describe('<ScreenHeader />', () => {
|
|||||||
expect(breadcrumbItem.first().text()).toBe('Foo');
|
expect(breadcrumbItem.first().text()).toBe('Foo');
|
||||||
expect(breadcrumbItem.last().text()).toBe('One');
|
expect(breadcrumbItem.last().text()).toBe('One');
|
||||||
expect(breadcrumbHeading.text()).toBe('Bar');
|
expect(breadcrumbHeading.text()).toBe('Bar');
|
||||||
breadcrumbWrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('renders breadcrumb items defined in breadcrumbConfig', () => {
|
test('renders breadcrumb items defined in breadcrumbConfig', () => {
|
||||||
@@ -66,7 +65,6 @@ describe('<ScreenHeader />', () => {
|
|||||||
expect(breadcrumbWrapper.find('BreadcrumbItem')).toHaveLength(
|
expect(breadcrumbWrapper.find('BreadcrumbItem')).toHaveLength(
|
||||||
crumbLength
|
crumbLength
|
||||||
);
|
);
|
||||||
breadcrumbWrapper.unmount();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ describe('<AdvancedSearch />', () => {
|
|||||||
let wrapper;
|
let wrapper;
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
wrapper.unmount();
|
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,10 @@ describe('<SelectableCard />', () => {
|
|||||||
test('initially renders without crashing when not selected', () => {
|
test('initially renders without crashing when not selected', () => {
|
||||||
wrapper = shallow(<SelectableCard onClick={onClick} />);
|
wrapper = shallow(<SelectableCard onClick={onClick} />);
|
||||||
expect(wrapper.length).toBe(1);
|
expect(wrapper.length).toBe(1);
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('initially renders without crashing when selected', () => {
|
test('initially renders without crashing when selected', () => {
|
||||||
wrapper = shallow(<SelectableCard isSelected onClick={onClick} />);
|
wrapper = shallow(<SelectableCard isSelected onClick={onClick} />);
|
||||||
expect(wrapper.length).toBe(1);
|
expect(wrapper.length).toBe(1);
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ describe('<DraggableSelectedList />', () => {
|
|||||||
let wrapper;
|
let wrapper;
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should render expected rows', () => {
|
test('should render expected rows', () => {
|
||||||
const mockSelected = [
|
const mockSelected = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,25 +1,17 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { act } from 'react-dom/test-utils';
|
||||||
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
||||||
|
|
||||||
import ActivityStream from './ActivityStream';
|
import ActivityStream from './ActivityStream';
|
||||||
|
|
||||||
jest.mock('react-router-dom', () => ({
|
jest.mock('../../api');
|
||||||
...jest.requireActual('react-router-dom'),
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('<ActivityStream />', () => {
|
describe('<ActivityStream />', () => {
|
||||||
let pageWrapper;
|
test('initially renders without crashing', async () => {
|
||||||
|
let pageWrapper;
|
||||||
beforeEach(() => {
|
await act(async () => {
|
||||||
pageWrapper = mountWithContexts(<ActivityStream />);
|
pageWrapper = await mountWithContexts(<ActivityStream />);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
pageWrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('initially renders without crashing', () => {
|
|
||||||
expect(pageWrapper.length).toBe(1);
|
expect(pageWrapper.length).toBe(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,21 +1,13 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { act } from 'react-dom/test-utils';
|
|
||||||
import { createMemoryHistory } from 'history';
|
import { createMemoryHistory } from 'history';
|
||||||
|
import { shallow } from 'enzyme';
|
||||||
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
||||||
|
|
||||||
import Applications from './Applications';
|
import Applications from './Applications';
|
||||||
|
|
||||||
jest.mock('react-router-dom', () => ({
|
|
||||||
...jest.requireActual('react-router-dom'),
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('<Applications />', () => {
|
describe('<Applications />', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('renders successfully', () => {
|
test('renders successfully', () => {
|
||||||
wrapper = mountWithContexts(<Applications />);
|
wrapper = mountWithContexts(<Applications />);
|
||||||
const pageSections = wrapper.find('PageSection');
|
const pageSections = wrapper.find('PageSection');
|
||||||
@@ -28,22 +20,20 @@ describe('<Applications />', () => {
|
|||||||
const history = createMemoryHistory({
|
const history = createMemoryHistory({
|
||||||
initialEntries: ['/applications/add'],
|
initialEntries: ['/applications/add'],
|
||||||
});
|
});
|
||||||
wrapper = mountWithContexts(<Applications />, {
|
wrapper = shallow(<Applications />, {
|
||||||
context: { router: { history } },
|
context: { router: { history } },
|
||||||
});
|
});
|
||||||
expect(wrapper.find('Modal[title="Application information"]').length).toBe(
|
expect(wrapper.find('Modal[title="Application information"]').length).toBe(
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
await act(async () => {
|
wrapper
|
||||||
wrapper
|
.find('ApplicationAdd')
|
||||||
.find('ApplicationAdd')
|
.props()
|
||||||
.props()
|
.onSuccessfulAdd({
|
||||||
.onSuccessfulAdd({
|
name: 'test',
|
||||||
name: 'test',
|
client_id: 'foobar',
|
||||||
client_id: 'foobar',
|
client_secret: 'aaaaaaaaaaaaaaaaaaaaaaaaaa',
|
||||||
client_secret: 'aaaaaaaaaaaaaaaaaaaaaaaaaa',
|
});
|
||||||
});
|
|
||||||
});
|
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(wrapper.find('Modal[title="Application information"]').length).toBe(
|
expect(wrapper.find('Modal[title="Application information"]').length).toBe(
|
||||||
1
|
1
|
||||||
|
|||||||
@@ -196,7 +196,6 @@ describe('<CredentialAdd />', () => {
|
|||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(wrapper.find('ContentError').length).toBe(1);
|
expect(wrapper.find('ContentError').length).toBe(1);
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -485,7 +485,6 @@ describe('<CredentialEdit />', () => {
|
|||||||
});
|
});
|
||||||
wrapper.update();
|
wrapper.update();
|
||||||
expect(wrapper.find('ContentError').length).toBe(1);
|
expect(wrapper.find('ContentError').length).toBe(1);
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ describe('<CredentialList />', () => {
|
|||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
wrapper.unmount();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
test('initially renders successfully', () => {
|
test('initially renders successfully', () => {
|
||||||
|
|||||||
@@ -10,10 +10,6 @@ jest.mock('../../../api');
|
|||||||
describe('<CredentialListItem />', () => {
|
describe('<CredentialListItem />', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
|
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('edit button shown to users with edit capabilities', () => {
|
test('edit button shown to users with edit capabilities', () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<table>
|
<table>
|
||||||
|
|||||||
@@ -1,60 +1,16 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { createMemoryHistory } from 'history';
|
import { shallow } from 'enzyme';
|
||||||
import { mountWithContexts } from '../../../testUtils/enzymeHelpers';
|
|
||||||
import Credentials from './Credentials';
|
import Credentials from './Credentials';
|
||||||
|
|
||||||
jest.mock('react-router-dom', () => ({
|
|
||||||
...jest.requireActual('react-router-dom'),
|
|
||||||
}));
|
|
||||||
|
|
||||||
describe('<Credentials />', () => {
|
describe('<Credentials />', () => {
|
||||||
let wrapper;
|
test('should set breadcrumb config', () => {
|
||||||
|
const wrapper = shallow(<Credentials />);
|
||||||
|
|
||||||
afterEach(() => {
|
const header = wrapper.find('ScreenHeader');
|
||||||
wrapper.unmount();
|
expect(header.prop('streamType')).toEqual('credential');
|
||||||
});
|
expect(header.prop('breadcrumbConfig')).toEqual({
|
||||||
|
'/credentials': 'Credentials',
|
||||||
test('initially renders successfully', () => {
|
'/credentials/add': 'Create New Credential',
|
||||||
wrapper = mountWithContexts(<Credentials />);
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should display credential list breadcrumb heading', () => {
|
|
||||||
const history = createMemoryHistory({
|
|
||||||
initialEntries: ['/credentials'],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
wrapper = mountWithContexts(<Credentials />, {
|
|
||||||
context: {
|
|
||||||
router: {
|
|
||||||
history,
|
|
||||||
route: {
|
|
||||||
location: history.location,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(wrapper.find('Crumb').length).toBe(0);
|
|
||||||
expect(wrapper.find('Title').text()).toBe('Credentials');
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should display create new credential breadcrumb heading', () => {
|
|
||||||
const history = createMemoryHistory({
|
|
||||||
initialEntries: ['/credentials/add'],
|
|
||||||
});
|
|
||||||
|
|
||||||
wrapper = mountWithContexts(<Credentials />, {
|
|
||||||
context: {
|
|
||||||
router: {
|
|
||||||
history,
|
|
||||||
route: {
|
|
||||||
location: history.location,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
expect(wrapper.find('Crumb').length).toBe(2);
|
|
||||||
expect(wrapper.find('Title').text()).toBe('Create New Credential');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -95,15 +95,15 @@ describe('<CredentialForm />', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('should display form fields on add properly', async () => {
|
test('should display form fields on add properly', async () => {
|
||||||
addFieldExpects();
|
addFieldExpects();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should hide Test button initially', () => {
|
test('should hide Test button initially', () => {
|
||||||
expect(wrapper.find('Button[children="Test"]').length).toBe(0);
|
expect(wrapper.find('Button[children="Test"]').length).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should update form values', async () => {
|
test('should update form values', async () => {
|
||||||
// name and description change
|
// name and description change
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
@@ -135,6 +135,7 @@ describe('<CredentialForm />', () => {
|
|||||||
name: 'organization',
|
name: 'organization',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should display cred type subform when scm type select has a value', async () => {
|
test('should display cred type subform when scm type select has a value', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
await wrapper
|
await wrapper
|
||||||
@@ -218,6 +219,7 @@ describe('<CredentialForm />', () => {
|
|||||||
wrapper.find('textarea#credential-ssh_key_data').prop('value')
|
wrapper.find('textarea#credential-ssh_key_data').prop('value')
|
||||||
).toBe('');
|
).toBe('');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should update field when RSA Private Key file uploaded', async () => {
|
test('should update field when RSA Private Key file uploaded', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper.find('FileUpload#credential-ssh_key_data').invoke('onChange')(
|
wrapper.find('FileUpload#credential-ssh_key_data').invoke('onChange')(
|
||||||
@@ -232,6 +234,7 @@ describe('<CredentialForm />', () => {
|
|||||||
'-----BEGIN PRIVATE KEY-----\\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\\n-----END PRIVATE KEY-----\\n'
|
'-----BEGIN PRIVATE KEY-----\\nBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\\n-----END PRIVATE KEY-----\\n'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should show error when error thrown parsing JSON', async () => {
|
test('should show error when error thrown parsing JSON', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
await wrapper
|
await wrapper
|
||||||
@@ -295,9 +298,6 @@ describe('<CredentialForm />', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('Edit', () => {
|
describe('Edit', () => {
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('Initially renders successfully', async () => {
|
test('Initially renders successfully', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ const fieldOptions = {
|
|||||||
|
|
||||||
describe('<CredentialField />', () => {
|
describe('<CredentialField />', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
afterEach(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('renders correctly without initial value', () => {
|
test('renders correctly without initial value', () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Formik
|
<Formik
|
||||||
@@ -42,6 +39,7 @@ describe('<CredentialField />', () => {
|
|||||||
expect(wrapper.find('KeyIcon').length).toBe(1);
|
expect(wrapper.find('KeyIcon').length).toBe(1);
|
||||||
expect(wrapper.find('PficonHistoryIcon').length).toBe(0);
|
expect(wrapper.find('PficonHistoryIcon').length).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('renders correctly with initial value', () => {
|
test('renders correctly with initial value', () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Formik
|
<Formik
|
||||||
@@ -68,6 +66,7 @@ describe('<CredentialField />', () => {
|
|||||||
expect(wrapper.find('KeyIcon').length).toBe(1);
|
expect(wrapper.find('KeyIcon').length).toBe(1);
|
||||||
expect(wrapper.find('PficonHistoryIcon').length).toBe(1);
|
expect(wrapper.find('PficonHistoryIcon').length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('replace/revert button behaves as expected', async () => {
|
test('replace/revert button behaves as expected', async () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<Formik
|
<Formik
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Formik } from 'formik';
|
import { Formik } from 'formik';
|
||||||
import { TextInput } from '@patternfly/react-core';
|
import { TextInput } from '@patternfly/react-core';
|
||||||
|
import { act } from 'react-dom/test-utils';
|
||||||
import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers';
|
import { mountWithContexts } from '../../../../../testUtils/enzymeHelpers';
|
||||||
import CredentialPluginField from './CredentialPluginField';
|
import CredentialPluginField from './CredentialPluginField';
|
||||||
|
|
||||||
@@ -10,6 +11,8 @@ const fieldOptions = {
|
|||||||
type: 'string',
|
type: 'string',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
jest.mock('../../../../api');
|
||||||
|
|
||||||
describe('<CredentialPluginField />', () => {
|
describe('<CredentialPluginField />', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
describe('No plugin configured', () => {
|
describe('No plugin configured', () => {
|
||||||
@@ -34,20 +37,23 @@ describe('<CredentialPluginField />', () => {
|
|||||||
</Formik>
|
</Formik>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('renders the expected content', () => {
|
test('renders the expected content', () => {
|
||||||
expect(wrapper.find('input').length).toBe(1);
|
expect(wrapper.find('input').length).toBe(1);
|
||||||
expect(wrapper.find('KeyIcon').length).toBe(1);
|
expect(wrapper.find('KeyIcon').length).toBe(1);
|
||||||
expect(wrapper.find('CredentialPluginSelected').length).toBe(0);
|
expect(wrapper.find('CredentialPluginSelected').length).toBe(0);
|
||||||
});
|
});
|
||||||
test('clicking plugin button shows plugin prompt', () => {
|
|
||||||
|
test('clicking plugin button shows plugin prompt', async () => {
|
||||||
expect(wrapper.find('CredentialPluginPrompt').length).toBe(0);
|
expect(wrapper.find('CredentialPluginPrompt').length).toBe(0);
|
||||||
wrapper.find('KeyIcon').simulate('click');
|
await act(async () => {
|
||||||
|
wrapper.find('KeyIcon').simulate('click');
|
||||||
|
});
|
||||||
|
wrapper.update();
|
||||||
expect(wrapper.find('CredentialPluginPrompt').length).toBe(1);
|
expect(wrapper.find('CredentialPluginPrompt').length).toBe(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Plugin already configured', () => {
|
describe('Plugin already configured', () => {
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
@@ -78,9 +84,7 @@ describe('<CredentialPluginField />', () => {
|
|||||||
</Formik>
|
</Formik>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('renders the expected content', () => {
|
test('renders the expected content', () => {
|
||||||
expect(wrapper.find('CredentialPluginPrompt').length).toBe(0);
|
expect(wrapper.find('CredentialPluginPrompt').length).toBe(0);
|
||||||
expect(wrapper.find('input').length).toBe(0);
|
expect(wrapper.find('input').length).toBe(0);
|
||||||
|
|||||||
@@ -99,10 +99,6 @@ describe('<CredentialPluginPrompt />', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('should render Wizard with all steps', async () => {
|
test('should render Wizard with all steps', async () => {
|
||||||
const wizard = await waitForElement(wrapper, 'Wizard');
|
const wizard = await waitForElement(wrapper, 'Wizard');
|
||||||
const steps = wizard.prop('steps');
|
const steps = wizard.prop('steps');
|
||||||
@@ -119,15 +115,18 @@ describe('<CredentialPluginPrompt />', () => {
|
|||||||
wrapper.find('Radio').filterWhere(radio => radio.isChecked).length
|
wrapper.find('Radio').filterWhere(radio => radio.isChecked).length
|
||||||
).toBe(0);
|
).toBe(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('next button disabled until credential selected', () => {
|
test('next button disabled until credential selected', () => {
|
||||||
expect(wrapper.find('Button[children="Next"]').prop('isDisabled')).toBe(
|
expect(wrapper.find('Button[children="Next"]').prop('isDisabled')).toBe(
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('clicking cancel button calls correct function', () => {
|
test('clicking cancel button calls correct function', () => {
|
||||||
wrapper.find('Button[children="Cancel"]').simulate('click');
|
wrapper.find('Button[children="Cancel"]').simulate('click');
|
||||||
expect(onClose).toHaveBeenCalledTimes(1);
|
expect(onClose).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('clicking credential row enables next button', async () => {
|
test('clicking credential row enables next button', async () => {
|
||||||
await waitForElement(wrapper, 'CheckboxListItem', el => el.length > 0);
|
await waitForElement(wrapper, 'CheckboxListItem', el => el.length > 0);
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
@@ -207,9 +206,7 @@ describe('<CredentialPluginPrompt />', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('should render Wizard with all steps', async () => {
|
test('should render Wizard with all steps', async () => {
|
||||||
const wizard = await waitForElement(wrapper, 'Wizard');
|
const wizard = await waitForElement(wrapper, 'Wizard');
|
||||||
const steps = wizard.prop('steps');
|
const steps = wizard.prop('steps');
|
||||||
@@ -218,6 +215,7 @@ describe('<CredentialPluginPrompt />', () => {
|
|||||||
expect(steps[0].name).toEqual('Credential');
|
expect(steps[0].name).toEqual('Credential');
|
||||||
expect(steps[1].name).toEqual('Metadata');
|
expect(steps[1].name).toEqual('Metadata');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('credentials step renders correctly', async () => {
|
test('credentials step renders correctly', async () => {
|
||||||
await waitForElement(wrapper, 'CheckboxListItem', el => el.length > 0);
|
await waitForElement(wrapper, 'CheckboxListItem', el => el.length > 0);
|
||||||
|
|
||||||
@@ -233,6 +231,7 @@ describe('<CredentialPluginPrompt />', () => {
|
|||||||
false
|
false
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('metadata step renders correctly', async () => {
|
test('metadata step renders correctly', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper.find('Button[children="Next"]').simulate('click');
|
wrapper.find('Button[children="Next"]').simulate('click');
|
||||||
@@ -247,6 +246,7 @@ describe('<CredentialPluginPrompt />', () => {
|
|||||||
wrapper.find('input#credential-secret_version').prop('value')
|
wrapper.find('input#credential-secret_version').prop('value')
|
||||||
).toBe('9000');
|
).toBe('9000');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('clicking Test button makes correct call', async () => {
|
test('clicking Test button makes correct call', async () => {
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper.find('Button[children="Test"]').simulate('click');
|
wrapper.find('Button[children="Test"]').simulate('click');
|
||||||
|
|||||||
@@ -16,17 +16,17 @@ describe('<CredentialPluginSelected />', () => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
afterAll(() => {
|
|
||||||
wrapper.unmount();
|
|
||||||
});
|
|
||||||
test('renders the expected content', () => {
|
test('renders the expected content', () => {
|
||||||
expect(wrapper.find('CredentialChip').length).toBe(1);
|
expect(wrapper.find('CredentialChip').length).toBe(1);
|
||||||
expect(wrapper.find('KeyIcon').length).toBe(1);
|
expect(wrapper.find('KeyIcon').length).toBe(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('clearing plugin calls expected function', () => {
|
test('clearing plugin calls expected function', () => {
|
||||||
wrapper.find('CredentialChip button').simulate('click');
|
wrapper.find('CredentialChip button').simulate('click');
|
||||||
expect(onClearPlugin).toBeCalledTimes(1);
|
expect(onClearPlugin).toBeCalledTimes(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('editing plugin calls expected function', () => {
|
test('editing plugin calls expected function', () => {
|
||||||
wrapper.find('KeyIcon').simulate('click');
|
wrapper.find('KeyIcon').simulate('click');
|
||||||
expect(onEditPlugin).toBeCalledTimes(1);
|
expect(onEditPlugin).toBeCalledTimes(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user