mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 06:28:01 -03:30
* working: rename OrganizationTeamsList to PaginatedDataList * convert org notifications list fully to PaginatedDataList * update NotificationList tests * refactor org access to use PaginatedDataList * update tests for org access refactor; fix pagination & sorting * restore Add Role functionality to Org roles * fix displayed text when list of items is empty * preserve query params when navigating through pagination * fix bugs after RBAC rebase * fix lint errors, fix add org access button
28 lines
740 B
JavaScript
28 lines
740 B
JavaScript
import React from 'react';
|
|
import { mountWithContexts } from '../../../enzymeHelpers';
|
|
import DeleteRoleConfirmationModal from '../../../../src/pages/Organizations/components/DeleteRoleConfirmationModal';
|
|
|
|
const role = {
|
|
id: 3,
|
|
name: 'Member',
|
|
resource_name: 'Org',
|
|
resource_type: 'organization',
|
|
team_id: 5,
|
|
team_name: 'The Team',
|
|
};
|
|
|
|
describe('<DeleteRoleConfirmationModal />', () => {
|
|
test('should render initially', () => {
|
|
const wrapper = mountWithContexts(
|
|
<DeleteRoleConfirmationModal
|
|
role={role}
|
|
username="jane"
|
|
onCancel={() => {}}
|
|
onConfirm={() => {}}
|
|
/>
|
|
);
|
|
wrapper.update();
|
|
expect(wrapper.find('DeleteRoleConfirmationModal')).toMatchSnapshot();
|
|
});
|
|
});
|