mirror of
https://github.com/ansible/awx.git
synced 2026-03-20 18:37:39 -02:30
Merge pull request #8563 from AlexSCorey/8535-UpgradePF
Updates PF dependency Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
60
awx/ui_next/package-lock.json
generated
60
awx/ui_next/package-lock.json
generated
@@ -3013,38 +3013,45 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@patternfly/patternfly": {
|
"@patternfly/patternfly": {
|
||||||
"version": "4.23.3",
|
"version": "4.59.1",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.23.3.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/patternfly/-/patternfly-4.59.1.tgz",
|
||||||
"integrity": "sha512-q8C98ihcRYBY+FB+KY3bQ9y1Pn/NjBff4hwKsxatrs/MSO/++CuEncg4q7WHjIq2zadA4/7W+Vg3CXuiOP0geg=="
|
"integrity": "sha512-zk3aqg62JXMTzzJMJsyVgt5fXlcxUUkRKkaxUv/hwpjhGiyLexZ1l3Gupb9ziYl74p38KzbbfcfdnlFCwJZfgg=="
|
||||||
},
|
},
|
||||||
"@patternfly/react-core": {
|
"@patternfly/react-core": {
|
||||||
"version": "4.32.1",
|
"version": "4.75.2",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.32.1.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/react-core/-/react-core-4.75.2.tgz",
|
||||||
"integrity": "sha512-4FrKJvMfjHjWtmvGu1QVxo/nCdUgePlkdNzMs91r0wdL16CpfoQVtZcfZe4343fRAQ2ObeYfZ2GuiwvS1sw8Og==",
|
"integrity": "sha512-hoCeTahVgl5I0jA74/so2bZL1eabSD2Uwt8uYgz+W+ShYAC4rJreLOVn43I15J5VPpwIvxrbubccpBqCGL2+wA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@patternfly/react-icons": "^4.5.0",
|
"@patternfly/react-icons": "^4.7.16",
|
||||||
"@patternfly/react-styles": "^4.5.0",
|
"@patternfly/react-styles": "^4.7.12",
|
||||||
"@patternfly/react-tokens": "^4.6.0",
|
"@patternfly/react-tokens": "^4.9.16",
|
||||||
"focus-trap": "4.0.2",
|
"focus-trap": "4.0.2",
|
||||||
"react-dropzone": "9.0.0",
|
"react-dropzone": "9.0.0",
|
||||||
"tippy.js": "5.1.2",
|
"tippy.js": "5.1.2",
|
||||||
"tslib": "^1.11.1"
|
"tslib": "1.13.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": {
|
||||||
|
"version": "1.13.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
|
||||||
|
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@patternfly/react-icons": {
|
"@patternfly/react-icons": {
|
||||||
"version": "4.5.0",
|
"version": "4.7.16",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/react-icons/-/react-icons-4.7.16.tgz",
|
||||||
"integrity": "sha512-wXAENYa6nST4D8DBkiCrZXf4aRTmVQNA4cyImMJ3aQWAzwJ7Xc1zIBBuYSX5EP0JOuf9DzWVCrzvgfQz1Fcx8g=="
|
"integrity": "sha512-g1RsaGy/FRsHINdHpHR9RNhC72qs5W/0wIUQVB0HPtCrXdr1UfJCh03RRIhixfGPQDYgw9Ou3j3rARljhwUPUw=="
|
||||||
},
|
},
|
||||||
"@patternfly/react-styles": {
|
"@patternfly/react-styles": {
|
||||||
"version": "4.5.0",
|
"version": "4.7.12",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/react-styles/-/react-styles-4.7.12.tgz",
|
||||||
"integrity": "sha512-6w8mvxx/cC+yUzBKlWY8YRnavlWCTLWly1si0skleYPF1t69f3P+jeXNy39kH6+o2vXJR5MeecLrnuMV0XtKvg=="
|
"integrity": "sha512-+IfOc0E440Q61IYQZbux7pwcLf7JWQd1rOs2DDWnoVaw82zr/BZMtGh9T2kcklcH7TUHavSyF6tlCgU40IQ/4g=="
|
||||||
},
|
},
|
||||||
"@patternfly/react-tokens": {
|
"@patternfly/react-tokens": {
|
||||||
"version": "4.6.0",
|
"version": "4.9.16",
|
||||||
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/@patternfly/react-tokens/-/react-tokens-4.9.16.tgz",
|
||||||
"integrity": "sha512-zpA4AlYqJNJm5aqsarBVjod1gjP9muJ5oWI2ZwGUFiw4YNRn8eY7QKQ1VvNZxqwI+WSXl98jTqJiKuJGF3DEvw=="
|
"integrity": "sha512-gqwhMDYHB2R01PlmT+CwaIQiXvc8s7ZywpLpO63rWjy+37cgtgBMApIxZx2tALTuJDYTmu9F/SUce5CUQIgwkQ=="
|
||||||
},
|
},
|
||||||
"@svgr/babel-plugin-add-jsx-attribute": {
|
"@svgr/babel-plugin-add-jsx-attribute": {
|
||||||
"version": "4.2.0",
|
"version": "4.2.0",
|
||||||
@@ -8272,11 +8279,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"file-selector": {
|
"file-selector": {
|
||||||
"version": "0.1.12",
|
"version": "0.1.18",
|
||||||
"resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.12.tgz",
|
"resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.18.tgz",
|
||||||
"integrity": "sha512-Kx7RTzxyQipHuiqyZGf+Nz4vY9R1XGxuQl/hLoJwq+J4avk/9wxxgZyHKtbyIPJmbD4A66DWGYfyykWNpcYutQ==",
|
"integrity": "sha512-MUY65bNFSE+VraxNpxAz04vDlPuh5qENA0WtfgDWoDnKV7ZN2InI8AbSp0F/3aHoJJVKmZ+cqachhVoBNGifWA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^2.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
|
||||||
|
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"filesize": {
|
"filesize": {
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@lingui/react": "^2.9.1",
|
"@lingui/react": "^2.9.1",
|
||||||
"@patternfly/patternfly": "^4.23.3",
|
"@patternfly/patternfly": "4.59.1",
|
||||||
"@patternfly/react-core": "^4.32.1",
|
"@patternfly/react-core": "4.75.2",
|
||||||
"@patternfly/react-icons": "^4.5.0",
|
"@patternfly/react-icons": "4.7.16",
|
||||||
"ansi-to-html": "^0.6.11",
|
"ansi-to-html": "^0.6.11",
|
||||||
"axios": "^0.18.1",
|
"axios": "^0.18.1",
|
||||||
"codemirror": "^5.47.0",
|
"codemirror": "^5.47.0",
|
||||||
|
|||||||
@@ -7,12 +7,10 @@ class NavExpandableGroup extends Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
const { routes } = this.props;
|
const { routes } = this.props;
|
||||||
this.state = { isExpanded: true };
|
|
||||||
|
|
||||||
// Extract a list of paths from the route params and store them for later. This creates
|
// Extract a list of paths from the route params and store them for later. This creates
|
||||||
// an array of url paths associated with any NavItem component rendered by this component.
|
// an array of url paths associated with any NavItem component rendered by this component.
|
||||||
this.navItemPaths = routes.map(({ path }) => path);
|
this.navItemPaths = routes.map(({ path }) => path);
|
||||||
this.handleExpand = this.handleExpand.bind(this);
|
|
||||||
this.isActiveGroup = this.isActiveGroup.bind(this);
|
this.isActiveGroup = this.isActiveGroup.bind(this);
|
||||||
this.isActivePath = this.isActivePath.bind(this);
|
this.isActivePath = this.isActivePath.bind(this);
|
||||||
}
|
}
|
||||||
@@ -26,13 +24,8 @@ class NavExpandableGroup extends Component {
|
|||||||
return Boolean(matchPath(history.location.pathname, { path }));
|
return Boolean(matchPath(history.location.pathname, { path }));
|
||||||
}
|
}
|
||||||
|
|
||||||
handleExpand(e, isExpanded) {
|
|
||||||
this.setState({ isExpanded });
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { groupId, groupTitle, routes } = this.props;
|
const { groupId, groupTitle, routes } = this.props;
|
||||||
const { isExpanded } = this.state;
|
|
||||||
|
|
||||||
if (routes.length === 1) {
|
if (routes.length === 1) {
|
||||||
const [{ path }] = routes;
|
const [{ path }] = routes;
|
||||||
@@ -46,10 +39,8 @@ class NavExpandableGroup extends Component {
|
|||||||
return (
|
return (
|
||||||
<NavExpandable
|
<NavExpandable
|
||||||
isActive={this.isActiveGroup()}
|
isActive={this.isActiveGroup()}
|
||||||
isExpanded={isExpanded}
|
|
||||||
groupId={groupId}
|
groupId={groupId}
|
||||||
title={groupTitle}
|
title={groupTitle}
|
||||||
onExpand={this.handleExpand}
|
|
||||||
>
|
>
|
||||||
{routes.map(({ path, title }) => (
|
{routes.map(({ path, title }) => (
|
||||||
<NavItem
|
<NavItem
|
||||||
|
|||||||
@@ -343,12 +343,10 @@ describe('<DataListToolbar />', () => {
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
await act(() =>
|
act(() => newToolbar.find('Search').prop('onShowAdvancedSearch')(true));
|
||||||
newToolbar.find('Search').prop('onShowAdvancedSearch')(true)
|
|
||||||
);
|
|
||||||
newToolbar.update();
|
newToolbar.update();
|
||||||
expect(newToolbar.find('KebabToggle').length).toBe(1);
|
expect(newToolbar.find('KebabToggle').length).toBe(1);
|
||||||
await act(() => newToolbar.find('KebabToggle').prop('onToggle')(true));
|
act(() => newToolbar.find('KebabToggle').prop('onToggle')(true));
|
||||||
newToolbar.update();
|
newToolbar.update();
|
||||||
expect(newToolbar.find('div[aria-label="add container"]').length).toBe(1);
|
expect(newToolbar.find('div[aria-label="add container"]').length).toBe(1);
|
||||||
expect(newToolbar.find('div[aria-label="add instance group"]').length).toBe(
|
expect(newToolbar.find('div[aria-label="add instance group"]').length).toBe(
|
||||||
|
|||||||
@@ -8,17 +8,17 @@ describe('<TagMultiSelect />', () => {
|
|||||||
<TagMultiSelect value="foo,bar" onChange={jest.fn()} />
|
<TagMultiSelect value="foo,bar" onChange={jest.fn()} />
|
||||||
);
|
);
|
||||||
wrapper.find('input').simulate('focus');
|
wrapper.find('input').simulate('focus');
|
||||||
const options = wrapper.find('SelectOption');
|
const options = wrapper.find('Chip');
|
||||||
expect(options).toHaveLength(2);
|
expect(options).toHaveLength(2);
|
||||||
expect(options.at(0).prop('value')).toEqual('foo');
|
expect(options.at(0).text()).toEqual('foo');
|
||||||
expect(options.at(1).prop('value')).toEqual('bar');
|
expect(options.at(1).text()).toEqual('bar');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should not treat empty string as an option', () => {
|
it('should not treat empty string as an option', () => {
|
||||||
const wrapper = mount(<TagMultiSelect value="" onChange={jest.fn()} />);
|
const wrapper = mount(<TagMultiSelect value="" onChange={jest.fn()} />);
|
||||||
wrapper.find('input').simulate('focus');
|
wrapper.find('SelectToggle').simulate('click');
|
||||||
expect(wrapper.find('Select').prop('isOpen')).toEqual(true);
|
expect(wrapper.find('Select').prop('isOpen')).toEqual(true);
|
||||||
expect(wrapper.find('SelectOption')).toHaveLength(0);
|
expect(wrapper.find('Chip')).toHaveLength(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should trigger onChange', () => {
|
it('should trigger onChange', () => {
|
||||||
|
|||||||
@@ -26,7 +26,9 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
>
|
>
|
||||||
<DataListItem
|
<DataListItem
|
||||||
aria-labelledby="items-list-item-9000"
|
aria-labelledby="items-list-item-9000"
|
||||||
|
className=""
|
||||||
id="9000"
|
id="9000"
|
||||||
|
isExpanded={false}
|
||||||
key="9000"
|
key="9000"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
@@ -283,7 +285,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
className="pf-c-switch"
|
className="pf-c-switch"
|
||||||
data-ouia-component-id={0}
|
data-ouia-component-id="OUIA-Generated-Switch-1"
|
||||||
data-ouia-component-type="PF4/Switch"
|
data-ouia-component-type="PF4/Switch"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
htmlFor="notification-9000-started-toggle"
|
htmlFor="notification-9000-started-toggle"
|
||||||
@@ -328,7 +330,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
className="pf-c-switch"
|
className="pf-c-switch"
|
||||||
data-ouia-component-id={1}
|
data-ouia-component-id="OUIA-Generated-Switch-2"
|
||||||
data-ouia-component-type="PF4/Switch"
|
data-ouia-component-type="PF4/Switch"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
htmlFor="notification-9000-success-toggle"
|
htmlFor="notification-9000-success-toggle"
|
||||||
@@ -373,7 +375,7 @@ exports[`<NotificationListItem canToggleNotifications /> initially renders succe
|
|||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
className="pf-c-switch"
|
className="pf-c-switch"
|
||||||
data-ouia-component-id={2}
|
data-ouia-component-id="OUIA-Generated-Switch-3"
|
||||||
data-ouia-component-type="PF4/Switch"
|
data-ouia-component-type="PF4/Switch"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
htmlFor="notification-9000-error-toggle"
|
htmlFor="notification-9000-error-toggle"
|
||||||
|
|||||||
@@ -99,11 +99,12 @@ exports[`<ToolbarDeleteButton /> should render button 1`] = `
|
|||||||
aria-disabled={true}
|
aria-disabled={true}
|
||||||
aria-label="Delete"
|
aria-label="Delete"
|
||||||
className="pf-c-button pf-m-secondary pf-m-disabled"
|
className="pf-c-button pf-m-secondary pf-m-disabled"
|
||||||
data-ouia-component-id={0}
|
data-ouia-component-id="OUIA-Generated-Button-secondary-1"
|
||||||
data-ouia-component-type="PF4/Button"
|
data-ouia-component-type="PF4/Button"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
disabled={true}
|
disabled={true}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
role={null}
|
||||||
tabIndex={null}
|
tabIndex={null}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -86,122 +86,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
</Button>,
|
</Button>,
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
appendTo={
|
appendTo={[Function]}
|
||||||
<body
|
|
||||||
class="pf-c-backdrop__open"
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<div
|
|
||||||
class="pf-c-backdrop"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="pf-l-bullseye"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
aria-describedby="pf-modal-part-2"
|
|
||||||
aria-label="Alert modal"
|
|
||||||
aria-labelledby="pf-modal-part-0 alert-modal-header-label pf-modal-part-1"
|
|
||||||
aria-modal="true"
|
|
||||||
class="pf-c-modal-box pf-m-sm"
|
|
||||||
data-ouia-component-id="0"
|
|
||||||
data-ouia-component-type="PF4/ModalContent"
|
|
||||||
data-ouia-safe="true"
|
|
||||||
id="pf-modal-part-0"
|
|
||||||
role="dialog"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
aria-disabled="false"
|
|
||||||
aria-label="Close"
|
|
||||||
class="pf-c-button pf-m-plain"
|
|
||||||
data-ouia-component-id="1"
|
|
||||||
data-ouia-component-type="PF4/Button"
|
|
||||||
data-ouia-safe="true"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
aria-hidden="true"
|
|
||||||
fill="currentColor"
|
|
||||||
height="1em"
|
|
||||||
role="img"
|
|
||||||
style="vertical-align: -0.125em;"
|
|
||||||
viewBox="0 0 352 512"
|
|
||||||
width="1em"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
|
||||||
transform=""
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
<header
|
|
||||||
class="pf-c-modal-box__header"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="AlertModal__Header-l9z1bu-0 hQFWHX"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
aria-hidden="true"
|
|
||||||
class="AlertModal___StyledExclamationCircleIcon-l9z1bu-1 jOhcwt"
|
|
||||||
fill="currentColor"
|
|
||||||
height="2em"
|
|
||||||
role="img"
|
|
||||||
style="vertical-align: -0.25em;"
|
|
||||||
viewBox="0 0 512 512"
|
|
||||||
width="2em"
|
|
||||||
>
|
|
||||||
<path
|
|
||||||
d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
|
|
||||||
transform=""
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
<h2
|
|
||||||
class="pf-c-title pf-m-2xl"
|
|
||||||
id="alert-modal-header-label"
|
|
||||||
>
|
|
||||||
Remove Team Access
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
<div
|
|
||||||
class="pf-c-modal-box__body"
|
|
||||||
id="pf-modal-part-2"
|
|
||||||
>
|
|
||||||
Are you sure you want to remove Member access from The Team? Doing so affects all members of the team.
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
If you only want to remove access for this particular user, please remove them from the team.
|
|
||||||
</div>
|
|
||||||
<footer
|
|
||||||
class="pf-c-modal-box__footer"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
aria-disabled="false"
|
|
||||||
aria-label="Confirm delete"
|
|
||||||
class="pf-c-button pf-m-danger"
|
|
||||||
data-ouia-component-id="2"
|
|
||||||
data-ouia-component-type="PF4/Button"
|
|
||||||
data-ouia-safe="true"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
Delete
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
aria-disabled="false"
|
|
||||||
class="pf-c-button pf-m-secondary"
|
|
||||||
data-ouia-component-id="3"
|
|
||||||
data-ouia-component-type="PF4/Button"
|
|
||||||
data-ouia-safe="true"
|
|
||||||
type="button"
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
}
|
|
||||||
aria-describedby=""
|
aria-describedby=""
|
||||||
aria-label="Alert modal"
|
aria-label="Alert modal"
|
||||||
aria-labelledby="alert-modal-header-label"
|
aria-labelledby="alert-modal-header-label"
|
||||||
@@ -226,6 +111,8 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
ouiaSafe={true}
|
ouiaSafe={true}
|
||||||
showClose={true}
|
showClose={true}
|
||||||
title="Remove Team Access"
|
title="Remove Team Access"
|
||||||
|
titleIconVariant={null}
|
||||||
|
titleLabel=""
|
||||||
variant="small"
|
variant="small"
|
||||||
>
|
>
|
||||||
<Portal
|
<Portal
|
||||||
@@ -243,7 +130,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
aria-labelledby="pf-modal-part-0 alert-modal-header-label pf-modal-part-1"
|
aria-labelledby="pf-modal-part-0 alert-modal-header-label pf-modal-part-1"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
class="pf-c-modal-box pf-m-sm"
|
class="pf-c-modal-box pf-m-sm"
|
||||||
data-ouia-component-id="0"
|
data-ouia-component-id="OUIA-Generated-Modal-small-1"
|
||||||
data-ouia-component-type="PF4/ModalContent"
|
data-ouia-component-type="PF4/ModalContent"
|
||||||
data-ouia-safe="true"
|
data-ouia-safe="true"
|
||||||
id="pf-modal-part-0"
|
id="pf-modal-part-0"
|
||||||
@@ -253,7 +140,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
class="pf-c-button pf-m-plain"
|
class="pf-c-button pf-m-plain"
|
||||||
data-ouia-component-id="1"
|
data-ouia-component-id="OUIA-Generated-Button-plain-1"
|
||||||
data-ouia-component-type="PF4/Button"
|
data-ouia-component-type="PF4/Button"
|
||||||
data-ouia-safe="true"
|
data-ouia-safe="true"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -269,7 +156,6 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
||||||
transform=""
|
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
@@ -291,7 +177,6 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
|
d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
|
||||||
transform=""
|
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
<h2
|
<h2
|
||||||
@@ -318,7 +203,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
aria-label="Confirm delete"
|
aria-label="Confirm delete"
|
||||||
class="pf-c-button pf-m-danger"
|
class="pf-c-button pf-m-danger"
|
||||||
data-ouia-component-id="2"
|
data-ouia-component-id="OUIA-Generated-Button-danger-1"
|
||||||
data-ouia-component-type="PF4/Button"
|
data-ouia-component-type="PF4/Button"
|
||||||
data-ouia-safe="true"
|
data-ouia-safe="true"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -328,7 +213,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
<button
|
<button
|
||||||
aria-disabled="false"
|
aria-disabled="false"
|
||||||
class="pf-c-button pf-m-secondary"
|
class="pf-c-button pf-m-secondary"
|
||||||
data-ouia-component-id="3"
|
data-ouia-component-id="OUIA-Generated-Button-secondary-1"
|
||||||
data-ouia-component-type="PF4/Button"
|
data-ouia-component-type="PF4/Button"
|
||||||
data-ouia-safe="true"
|
data-ouia-safe="true"
|
||||||
type="button"
|
type="button"
|
||||||
@@ -384,9 +269,12 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
isOpen={true}
|
isOpen={true}
|
||||||
labelId="pf-modal-part-1"
|
labelId="pf-modal-part-1"
|
||||||
onClose={[Function]}
|
onClose={[Function]}
|
||||||
|
ouiaId="OUIA-Generated-Modal-small-1"
|
||||||
ouiaSafe={true}
|
ouiaSafe={true}
|
||||||
showClose={true}
|
showClose={true}
|
||||||
title="Remove Team Access"
|
title="Remove Team Access"
|
||||||
|
titleIconVariant={null}
|
||||||
|
titleLabel=""
|
||||||
variant="small"
|
variant="small"
|
||||||
>
|
>
|
||||||
<Backdrop>
|
<Backdrop>
|
||||||
@@ -411,7 +299,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
aria-label="Alert modal"
|
aria-label="Alert modal"
|
||||||
aria-labelledby="pf-modal-part-0 alert-modal-header-label pf-modal-part-1"
|
aria-labelledby="pf-modal-part-0 alert-modal-header-label pf-modal-part-1"
|
||||||
className=""
|
className=""
|
||||||
data-ouia-component-id={0}
|
data-ouia-component-id="OUIA-Generated-Modal-small-1"
|
||||||
data-ouia-component-type="PF4/ModalContent"
|
data-ouia-component-type="PF4/ModalContent"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
id="pf-modal-part-0"
|
id="pf-modal-part-0"
|
||||||
@@ -424,7 +312,7 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
aria-labelledby="pf-modal-part-0 alert-modal-header-label pf-modal-part-1"
|
aria-labelledby="pf-modal-part-0 alert-modal-header-label pf-modal-part-1"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
className="pf-c-modal-box pf-m-sm"
|
className="pf-c-modal-box pf-m-sm"
|
||||||
data-ouia-component-id={0}
|
data-ouia-component-id="OUIA-Generated-Modal-small-1"
|
||||||
data-ouia-component-type="PF4/ModalContent"
|
data-ouia-component-type="PF4/ModalContent"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
id="pf-modal-part-0"
|
id="pf-modal-part-0"
|
||||||
@@ -444,11 +332,12 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
aria-disabled={false}
|
aria-disabled={false}
|
||||||
aria-label="Close"
|
aria-label="Close"
|
||||||
className="pf-c-button pf-m-plain"
|
className="pf-c-button pf-m-plain"
|
||||||
data-ouia-component-id={1}
|
data-ouia-component-id="OUIA-Generated-Button-plain-1"
|
||||||
data-ouia-component-type="PF4/Button"
|
data-ouia-component-type="PF4/Button"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
disabled={false}
|
disabled={false}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
role={null}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
<TimesIcon
|
<TimesIcon
|
||||||
@@ -472,14 +361,15 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
||||||
transform=""
|
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</TimesIcon>
|
</TimesIcon>
|
||||||
</button>
|
</button>
|
||||||
</Button>
|
</Button>
|
||||||
</ModalBoxCloseButton>
|
</ModalBoxCloseButton>
|
||||||
<ModalBoxHeader>
|
<ModalBoxHeader
|
||||||
|
help={null}
|
||||||
|
>
|
||||||
<header
|
<header
|
||||||
className="pf-c-modal-box__header"
|
className="pf-c-modal-box__header"
|
||||||
>
|
>
|
||||||
@@ -564,7 +454,6 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
|
d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"
|
||||||
transform=""
|
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</ExclamationCircleIcon>
|
</ExclamationCircleIcon>
|
||||||
@@ -614,11 +503,12 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
aria-disabled={false}
|
aria-disabled={false}
|
||||||
aria-label="Confirm delete"
|
aria-label="Confirm delete"
|
||||||
className="pf-c-button pf-m-danger"
|
className="pf-c-button pf-m-danger"
|
||||||
data-ouia-component-id={2}
|
data-ouia-component-id="OUIA-Generated-Button-danger-1"
|
||||||
data-ouia-component-type="PF4/Button"
|
data-ouia-component-type="PF4/Button"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
disabled={false}
|
disabled={false}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
role={null}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
@@ -633,11 +523,12 @@ exports[`<DeleteRoleConfirmationModal /> should render initially 1`] = `
|
|||||||
aria-disabled={false}
|
aria-disabled={false}
|
||||||
aria-label={null}
|
aria-label={null}
|
||||||
className="pf-c-button pf-m-secondary"
|
className="pf-c-button pf-m-secondary"
|
||||||
data-ouia-component-id={3}
|
data-ouia-component-id="OUIA-Generated-Button-secondary-1"
|
||||||
data-ouia-component-type="PF4/Button"
|
data-ouia-component-type="PF4/Button"
|
||||||
data-ouia-safe={true}
|
data-ouia-safe={true}
|
||||||
disabled={false}
|
disabled={false}
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
|
role={null}
|
||||||
type="button"
|
type="button"
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
|
|||||||
>
|
>
|
||||||
<DataListItem
|
<DataListItem
|
||||||
aria-labelledby="access-list-item"
|
aria-labelledby="access-list-item"
|
||||||
|
className=""
|
||||||
id="2"
|
id="2"
|
||||||
|
isExpanded={false}
|
||||||
key="2"
|
key="2"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
@@ -845,94 +847,101 @@ exports[`<ResourceAccessListItem /> initially renders succesfully 1`] = `
|
|||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="pf-c-chip-group"
|
className="pf-c-chip-group"
|
||||||
|
data-ouia-component-type="PF4/ChipGroup"
|
||||||
|
data-ouia-safe={true}
|
||||||
>
|
>
|
||||||
<ul
|
<div
|
||||||
aria-label="Chip group category"
|
className="pf-c-chip-group__main"
|
||||||
className="pf-c-chip-group__list"
|
|
||||||
role="list"
|
|
||||||
>
|
>
|
||||||
<li
|
<ul
|
||||||
className="pf-c-chip-group__list-item"
|
aria-label="Chip group category"
|
||||||
key="0"
|
className="pf-c-chip-group__list"
|
||||||
|
role="list"
|
||||||
>
|
>
|
||||||
<Chip
|
<li
|
||||||
className=""
|
className="pf-c-chip-group__list-item"
|
||||||
closeBtnAriaLabel="close"
|
key="0"
|
||||||
component="div"
|
|
||||||
isOverflowChip={false}
|
|
||||||
isReadOnly={false}
|
|
||||||
key=".$3"
|
|
||||||
onClick={[Function]}
|
|
||||||
tooltipPosition="top"
|
|
||||||
>
|
>
|
||||||
<GenerateId
|
<Chip
|
||||||
prefix="pf-random-id-"
|
className=""
|
||||||
|
closeBtnAriaLabel="close"
|
||||||
|
component="div"
|
||||||
|
isOverflowChip={false}
|
||||||
|
isReadOnly={false}
|
||||||
|
key=".$3"
|
||||||
|
onClick={[Function]}
|
||||||
|
tooltipPosition="top"
|
||||||
>
|
>
|
||||||
<div
|
<GenerateId
|
||||||
className="pf-c-chip"
|
prefix="pf-random-id-"
|
||||||
data-ouia-component-id={2}
|
|
||||||
data-ouia-component-type="PF4/Chip"
|
|
||||||
data-ouia-safe={true}
|
|
||||||
>
|
>
|
||||||
<span
|
<div
|
||||||
className="pf-c-chip__text"
|
className="pf-c-chip"
|
||||||
id="pf-random-id-1"
|
data-ouia-component-id="OUIA-Generated-Chip-1"
|
||||||
|
data-ouia-component-type="PF4/Chip"
|
||||||
|
data-ouia-safe={true}
|
||||||
>
|
>
|
||||||
Member
|
<span
|
||||||
</span>
|
className="pf-c-chip__text"
|
||||||
<Button
|
id="pf-random-id-1"
|
||||||
aria-label="close"
|
>
|
||||||
aria-labelledby="remove_pf-random-id-1 pf-random-id-1"
|
Member
|
||||||
id="remove_pf-random-id-1"
|
</span>
|
||||||
onClick={[Function]}
|
<Button
|
||||||
variant="plain"
|
|
||||||
>
|
|
||||||
<button
|
|
||||||
aria-disabled={false}
|
|
||||||
aria-label="close"
|
aria-label="close"
|
||||||
aria-labelledby="remove_pf-random-id-1 pf-random-id-1"
|
aria-labelledby="remove_pf-random-id-1 pf-random-id-1"
|
||||||
className="pf-c-button pf-m-plain"
|
|
||||||
data-ouia-component-id={3}
|
|
||||||
data-ouia-component-type="PF4/Button"
|
|
||||||
data-ouia-safe={true}
|
|
||||||
disabled={false}
|
|
||||||
id="remove_pf-random-id-1"
|
id="remove_pf-random-id-1"
|
||||||
onClick={[Function]}
|
onClick={[Function]}
|
||||||
type="button"
|
ouiaId="close"
|
||||||
|
variant="plain"
|
||||||
>
|
>
|
||||||
<TimesIcon
|
<button
|
||||||
aria-hidden="true"
|
aria-disabled={false}
|
||||||
color="currentColor"
|
aria-label="close"
|
||||||
noVerticalAlign={false}
|
aria-labelledby="remove_pf-random-id-1 pf-random-id-1"
|
||||||
size="sm"
|
className="pf-c-button pf-m-plain"
|
||||||
|
data-ouia-component-id="close"
|
||||||
|
data-ouia-component-type="PF4/Button"
|
||||||
|
data-ouia-safe={true}
|
||||||
|
disabled={false}
|
||||||
|
id="remove_pf-random-id-1"
|
||||||
|
onClick={[Function]}
|
||||||
|
role={null}
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
<svg
|
<TimesIcon
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
aria-labelledby={null}
|
color="currentColor"
|
||||||
fill="currentColor"
|
noVerticalAlign={false}
|
||||||
height="1em"
|
size="sm"
|
||||||
role="img"
|
|
||||||
style={
|
|
||||||
Object {
|
|
||||||
"verticalAlign": "-0.125em",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
viewBox="0 0 352 512"
|
|
||||||
width="1em"
|
|
||||||
>
|
>
|
||||||
<path
|
<svg
|
||||||
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
aria-hidden="true"
|
||||||
transform=""
|
aria-labelledby={null}
|
||||||
/>
|
fill="currentColor"
|
||||||
</svg>
|
height="1em"
|
||||||
</TimesIcon>
|
role="img"
|
||||||
</button>
|
style={
|
||||||
</Button>
|
Object {
|
||||||
</div>
|
"verticalAlign": "-0.125em",
|
||||||
</GenerateId>
|
}
|
||||||
</Chip>
|
}
|
||||||
</li>
|
viewBox="0 0 352 512"
|
||||||
</ul>
|
width="1em"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</TimesIcon>
|
||||||
|
</button>
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</GenerateId>
|
||||||
|
</Chip>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</GenerateId>
|
</GenerateId>
|
||||||
</ChipGroup>
|
</ChipGroup>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ describe('<InventoryGroupAdd />', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
test('handleSubmit should call api', async () => {
|
test('handleSubmit should call api', async () => {
|
||||||
|
GroupsAPI.create.mockResolvedValue({ data: {} });
|
||||||
await act(async () => {
|
await act(async () => {
|
||||||
wrapper.find('InventoryGroupForm').prop('handleSubmit')({
|
wrapper.find('InventoryGroupForm').prop('handleSubmit')({
|
||||||
name: 'Bar',
|
name: 'Bar',
|
||||||
|
|||||||
@@ -57,18 +57,15 @@ describe('<InventoryRelatedGroupAdd/>', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test('should throw error on creation of group', async () => {
|
test('should throw error on creation of group', async () => {
|
||||||
GroupsAPI.create.mockRejectedValue(
|
GroupsAPI.create.mockRejectedValue({
|
||||||
new Error({
|
response: {
|
||||||
response: {
|
config: {
|
||||||
config: {
|
method: 'post',
|
||||||
method: 'post',
|
url: '/api/v2/groups/',
|
||||||
url: '/api/v2/groups/',
|
|
||||||
},
|
|
||||||
data: 'An error occurred',
|
|
||||||
status: 403,
|
|
||||||
},
|
},
|
||||||
})
|
data: { detail: 'An error occurred' },
|
||||||
);
|
},
|
||||||
|
});
|
||||||
await act(() =>
|
await act(() =>
|
||||||
wrapper.find('InventoryGroupForm').prop('handleSubmit')({
|
wrapper.find('InventoryGroupForm').prop('handleSubmit')({
|
||||||
name: 'foo',
|
name: 'foo',
|
||||||
@@ -81,18 +78,15 @@ describe('<InventoryRelatedGroupAdd/>', () => {
|
|||||||
|
|
||||||
test('should throw error on association of group', async () => {
|
test('should throw error on association of group', async () => {
|
||||||
GroupsAPI.create.mockResolvedValue({ data: { id: 3 } });
|
GroupsAPI.create.mockResolvedValue({ data: { id: 3 } });
|
||||||
GroupsAPI.associateChildGroup.mockRejectedValue(
|
GroupsAPI.associateChildGroup.mockRejectedValue({
|
||||||
new Error({
|
response: {
|
||||||
response: {
|
config: {
|
||||||
config: {
|
method: 'post',
|
||||||
method: 'post',
|
url: '/api/v2/groups/',
|
||||||
url: '/api/v2/groups/',
|
|
||||||
},
|
|
||||||
data: 'An error occurred',
|
|
||||||
status: 403,
|
|
||||||
},
|
},
|
||||||
})
|
data: { detail: 'An error occurred' },
|
||||||
);
|
},
|
||||||
|
});
|
||||||
await act(() =>
|
await act(() =>
|
||||||
wrapper.find('InventoryGroupForm').prop('handleSubmit')({
|
wrapper.find('InventoryGroupForm').prop('handleSubmit')({
|
||||||
name: 'foo',
|
name: 'foo',
|
||||||
|
|||||||
@@ -36,7 +36,15 @@ describe('<InventoryGroupForm />', () => {
|
|||||||
handleSubmit={jest.fn()}
|
handleSubmit={jest.fn()}
|
||||||
handleCancel={jest.fn()}
|
handleCancel={jest.fn()}
|
||||||
group={group}
|
group={group}
|
||||||
error
|
error={{
|
||||||
|
response: {
|
||||||
|
config: {
|
||||||
|
method: 'post',
|
||||||
|
url: '/api/v2/groups/',
|
||||||
|
},
|
||||||
|
data: { detail: 'An error occurred' },
|
||||||
|
},
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
expect(newWrapper.find('FormSubmitError').length).toBe(1);
|
expect(newWrapper.find('FormSubmitError').length).toBe(1);
|
||||||
|
|||||||
@@ -239,12 +239,12 @@ describe('<SurveyQuestionForm />', () => {
|
|||||||
});
|
});
|
||||||
await selectType(wrapper, 'multiselect');
|
await selectType(wrapper, 'multiselect');
|
||||||
await act(async () =>
|
await act(async () =>
|
||||||
wrapper.find('TextArea#question-options').prop('onChange')('a \n b', {
|
wrapper.find('textarea#question-options').simulate('change', {
|
||||||
target: { value: 'a \n b', name: 'choices' },
|
target: { value: 'a \n b', name: 'choices' },
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
await act(async () =>
|
await act(async () =>
|
||||||
wrapper.find('TextArea#question-default').prop('onChange')('b \n a', {
|
wrapper.find('textarea#question-options').simulate('change', {
|
||||||
target: { value: 'b \n a', name: 'default' },
|
target: { value: 'b \n a', name: 'default' },
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
@@ -271,12 +271,12 @@ describe('<SurveyQuestionForm />', () => {
|
|||||||
});
|
});
|
||||||
await selectType(wrapper, 'multiselect');
|
await selectType(wrapper, 'multiselect');
|
||||||
await act(async () =>
|
await act(async () =>
|
||||||
wrapper.find('TextArea#question-options').prop('onChange')('a \n b', {
|
wrapper.find('textarea#question-options').simulate('change', {
|
||||||
target: { value: 'a \n b', name: 'choices' },
|
target: { value: 'a \n b', name: 'choices' },
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
await act(async () =>
|
await act(async () =>
|
||||||
wrapper.find('TextArea#question-default').prop('onChange')('c', {
|
wrapper.find('textarea#question-default').simulate('change', {
|
||||||
target: { value: 'c', name: 'default' },
|
target: { value: 'c', name: 'default' },
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ describe('<LabelSelect />', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
expect(LabelsAPI.read).toHaveBeenCalledTimes(1);
|
expect(LabelsAPI.read).toHaveBeenCalledTimes(1);
|
||||||
wrapper.find('input').simulate('focus');
|
wrapper.find('SelectToggle').simulate('click');
|
||||||
const selectOptions = wrapper.find('SelectOption');
|
const selectOptions = wrapper.find('SelectOption');
|
||||||
expect(selectOptions).toHaveLength(2);
|
expect(selectOptions).toHaveLength(2);
|
||||||
expect(selectOptions.at(0).prop('value')).toEqual(options[0]);
|
expect(selectOptions.at(0).prop('value')).toEqual(options[0]);
|
||||||
@@ -58,7 +58,7 @@ describe('<LabelSelect />', () => {
|
|||||||
wrapper.update();
|
wrapper.update();
|
||||||
|
|
||||||
expect(LabelsAPI.read).toHaveBeenCalledTimes(2);
|
expect(LabelsAPI.read).toHaveBeenCalledTimes(2);
|
||||||
wrapper.find('input').simulate('focus');
|
wrapper.find('SelectToggle').simulate('click');
|
||||||
const selectOptions = wrapper.find('SelectOption');
|
const selectOptions = wrapper.find('SelectOption');
|
||||||
expect(selectOptions).toHaveLength(4);
|
expect(selectOptions).toHaveLength(4);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user