mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
Merge pull request #5131 from mabashian/5010-close-button
Removes close button from footer of host details modal Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -1,10 +1,5 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import {
|
import { Modal as PFModal, Tab, Tabs as PFTabs } from '@patternfly/react-core';
|
||||||
Button,
|
|
||||||
Modal as PFModal,
|
|
||||||
Tab,
|
|
||||||
Tabs as PFTabs,
|
|
||||||
} from '@patternfly/react-core';
|
|
||||||
import CodeMirrorInput from '@components/CodeMirrorInput';
|
import CodeMirrorInput from '@components/CodeMirrorInput';
|
||||||
import ContentEmpty from '@components/ContentEmpty';
|
import ContentEmpty from '@components/ContentEmpty';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
@@ -141,11 +136,6 @@ function HostEventModal({ onClose, hostEvent = {}, isOpen = false, i18n }) {
|
|||||||
isOpen={isOpen}
|
isOpen={isOpen}
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
title={i18n._(t`Host Details`)}
|
title={i18n._(t`Host Details`)}
|
||||||
actions={[
|
|
||||||
<Button key="cancel" variant="secondary" onClick={onClose}>
|
|
||||||
{i18n._(t`Close`)}
|
|
||||||
</Button>,
|
|
||||||
]}
|
|
||||||
>
|
>
|
||||||
<Tabs
|
<Tabs
|
||||||
aria-label={i18n._(t`Tabs`)}
|
aria-label={i18n._(t`Tabs`)}
|
||||||
|
|||||||
@@ -250,8 +250,7 @@ describe('HostEventModal', () => {
|
|||||||
const wrapper = mountWithContexts(
|
const wrapper = mountWithContexts(
|
||||||
<HostEventModal hostEvent={hostEvent} onClose={onClose} isOpen />
|
<HostEventModal hostEvent={hostEvent} onClose={onClose} isOpen />
|
||||||
);
|
);
|
||||||
const closeButton = wrapper.find('ModalBoxFooter Button');
|
wrapper.find('button[aria-label="Close"]').simulate('click');
|
||||||
closeButton.simulate('click');
|
|
||||||
expect(onClose).toBeCalled();
|
expect(onClose).toBeCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user