mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 22:07:36 -02:30
updates keys
This commit is contained in:
@@ -29,7 +29,7 @@ const children = ({ openAdHocCommands }) => (
|
|||||||
<button type="submit" onClick={() => openAdHocCommands()} />
|
<button type="submit" onClick={() => openAdHocCommands()} />
|
||||||
);
|
);
|
||||||
|
|
||||||
describe('<AdHocCOmmands />', () => {
|
describe('<AdHocCommands />', () => {
|
||||||
let wrapper;
|
let wrapper;
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
wrapper.unmount();
|
wrapper.unmount();
|
||||||
@@ -311,10 +311,8 @@ describe('<AdHocCOmmands />', () => {
|
|||||||
wrapper.find('Button[type="submit"]').prop('onClick')()
|
wrapper.find('Button[type="submit"]').prop('onClick')()
|
||||||
);
|
);
|
||||||
|
|
||||||
wrapper.update();
|
waitForElement(wrapper, 'ErrorDetail', el => el.length > 0);
|
||||||
|
|
||||||
expect(wrapper.find('AdHocCommandsWizard').length).toBe(0);
|
expect(wrapper.find('AdHocCommandsWizard').length).toBe(0);
|
||||||
expect(wrapper.find('ErrorDetail').length).toBe(1);
|
|
||||||
});
|
});
|
||||||
test('should open alert modal when error on fetching data', async () => {
|
test('should open alert modal when error on fetching data', async () => {
|
||||||
InventoriesAPI.readAdHocOptions.mockRejectedValue(
|
InventoriesAPI.readAdHocOptions.mockRejectedValue(
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ function InventoryGroupsList({ i18n }) {
|
|||||||
>
|
>
|
||||||
{({ openAdHocCommands }) => (
|
{({ openAdHocCommands }) => (
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
key="add"
|
key="run command"
|
||||||
onClick={openAdHocCommands}
|
onClick={openAdHocCommands}
|
||||||
isDisabled={groupCount === 0}
|
isDisabled={groupCount === 0}
|
||||||
>
|
>
|
||||||
@@ -171,6 +171,7 @@ function InventoryGroupsList({ i18n }) {
|
|||||||
<DropdownItem
|
<DropdownItem
|
||||||
variant="danger"
|
variant="danger"
|
||||||
aria-label={i18n._(t`Delete`)}
|
aria-label={i18n._(t`Delete`)}
|
||||||
|
key="delete"
|
||||||
onClick={toggleModal}
|
onClick={toggleModal}
|
||||||
isDisabled={selected.length === 0 || selected.some(cannotDelete)}
|
isDisabled={selected.length === 0 || selected.some(cannotDelete)}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user