updates keys

This commit is contained in:
Alex Corey 2020-08-19 09:17:24 -04:00
parent 94469cc8c0
commit 0e3fbb74d4
2 changed files with 4 additions and 5 deletions

View File

@ -29,7 +29,7 @@ const children = ({ openAdHocCommands }) => (
<button type="submit" onClick={() => openAdHocCommands()} />
);
describe('<AdHocCOmmands />', () => {
describe('<AdHocCommands />', () => {
let wrapper;
afterEach(() => {
wrapper.unmount();
@ -311,10 +311,8 @@ describe('<AdHocCOmmands />', () => {
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('ErrorDetail').length).toBe(1);
});
test('should open alert modal when error on fetching data', async () => {
InventoriesAPI.readAdHocOptions.mockRejectedValue(

View File

@ -160,7 +160,7 @@ function InventoryGroupsList({ i18n }) {
>
{({ openAdHocCommands }) => (
<DropdownItem
key="add"
key="run command"
onClick={openAdHocCommands}
isDisabled={groupCount === 0}
>
@ -171,6 +171,7 @@ function InventoryGroupsList({ i18n }) {
<DropdownItem
variant="danger"
aria-label={i18n._(t`Delete`)}
key="delete"
onClick={toggleModal}
isDisabled={selected.length === 0 || selected.some(cannotDelete)}
>