mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03:30
Patternfly upgrade (#188)
* correct spacing after PF update * update wizard layout/borders for PF upgrade
This commit is contained in:
@@ -3,7 +3,7 @@ import { shallow } from 'enzyme';
|
||||
import { mountWithContexts } from '../enzymeHelpers';
|
||||
import AddResourceRole from '../../src/components/AddRole/AddResourceRole';
|
||||
|
||||
describe('<SelectResourceStep />', () => {
|
||||
describe('<AddResourceRole />', () => {
|
||||
const readUsers = jest.fn().mockResolvedValue({
|
||||
data: {
|
||||
count: 2,
|
||||
@@ -147,6 +147,7 @@ describe('<SelectResourceStep />', () => {
|
||||
foo: 'bar'
|
||||
});
|
||||
});
|
||||
|
||||
test('handleResourceSelect clears out selected lists and sets selectedResource', () => {
|
||||
const wrapper = shallow(
|
||||
<AddResourceRole
|
||||
@@ -176,15 +177,18 @@ describe('<SelectResourceStep />', () => {
|
||||
expect(wrapper.state()).toEqual({
|
||||
selectedResource: 'users',
|
||||
selectedResourceRows: [],
|
||||
selectedRoleRows: []
|
||||
selectedRoleRows: [],
|
||||
currentStepId: 1,
|
||||
});
|
||||
wrapper.instance().handleResourceSelect('teams');
|
||||
expect(wrapper.state()).toEqual({
|
||||
selectedResource: 'teams',
|
||||
selectedResourceRows: [],
|
||||
selectedRoleRows: []
|
||||
selectedRoleRows: [],
|
||||
currentStepId: 1
|
||||
});
|
||||
});
|
||||
|
||||
test('handleWizardSave makes correct api calls, calls onSave when done', async () => {
|
||||
const handleSave = jest.fn();
|
||||
const wrapper = mountWithContexts(
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
import { mount, shallow } from 'enzyme';
|
||||
import { Router } from 'react-router-dom';
|
||||
import { createMemoryHistory } from 'history';
|
||||
import { Tab } from '@patternfly/react-core';
|
||||
import RoutedTabs, { _RoutedTabs } from '../../src/components/Tabs/RoutedTabs';
|
||||
|
||||
let wrapper;
|
||||
@@ -28,7 +29,7 @@ describe('<RoutedTabs />', () => {
|
||||
history={history}
|
||||
/>
|
||||
);
|
||||
expect(wrapper.find('Tab')).toHaveLength(4);
|
||||
expect(wrapper.find(Tab)).toHaveLength(4);
|
||||
});
|
||||
|
||||
test('Given a URL the correct tab is active', async () => {
|
||||
|
||||
@@ -80,10 +80,16 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
||||
</Badge>
|
||||
</DataListCell>,
|
||||
<DataListCell
|
||||
alignRight={true}
|
||||
alignRight={false}
|
||||
className=""
|
||||
isFilled={true}
|
||||
isIcon={false}
|
||||
style={
|
||||
Object {
|
||||
"display": "flex",
|
||||
"justifyContent": "flex-end",
|
||||
}
|
||||
}
|
||||
width={1}
|
||||
>
|
||||
<Switch
|
||||
@@ -175,15 +181,27 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
||||
</div>
|
||||
</DataListCell>
|
||||
<DataListCell
|
||||
alignRight={true}
|
||||
alignRight={false}
|
||||
className=""
|
||||
isFilled={true}
|
||||
isIcon={false}
|
||||
key="toggles"
|
||||
style={
|
||||
Object {
|
||||
"display": "flex",
|
||||
"justifyContent": "flex-end",
|
||||
}
|
||||
}
|
||||
width={1}
|
||||
>
|
||||
<div
|
||||
className="pf-c-data-list__cell pf-m-align-right"
|
||||
className="pf-c-data-list__cell"
|
||||
style={
|
||||
Object {
|
||||
"display": "flex",
|
||||
"justifyContent": "flex-end",
|
||||
}
|
||||
}
|
||||
>
|
||||
<Switch
|
||||
aria-label="Toggle notification success"
|
||||
|
||||
Reference in New Issue
Block a user