Unverified Commit 7805085f authored by jcaro's avatar jcaro Committed by GitHub
Browse files

fix(UI): Remove checkbox for default options sent for ack (#11008)

* Remove checkbox for sticky and persistent option in ack

* Adapt unit test for Acknowledgement
parent d8bc466f
......@@ -20,8 +20,6 @@ import {
labelNotify,
labelNotifyHelpCaption,
labelAcknowledgeServices,
labelPersistent,
labelSticky,
} from '../../../translatedLabels';
import { Resource } from '../../../models';
import useAclQuery from '../aclQuery';
......@@ -123,34 +121,6 @@ const DialogAcknowledge = ({
/>
</Grid>
)}
<Grid item>
<FormControlLabel
control={
<Checkbox
checked={values.persistent}
color="primary"
inputProps={{ 'aria-label': t(labelPersistent) }}
size="small"
onChange={handleChange('persistent')}
/>
}
label={t(labelPersistent) as string}
/>
</Grid>
<Grid item>
<FormControlLabel
control={
<Checkbox
checked={values.isSticky}
color="primary"
inputProps={{ 'aria-label': t(labelSticky) }}
size="small"
onChange={handleChange('isSticky')}
/>
}
label={t(labelSticky) as string}
/>
</Grid>
</Grid>
</Dialog>
);
......
......@@ -46,7 +46,6 @@ import {
labelCritical,
labelUnknown,
labelAddComment,
labelPersistent,
} from '../translatedLabels';
import useLoadResources from '../Listing/useLoadResources';
import useListing from '../Listing/useListing';
......@@ -77,6 +76,7 @@ jest.mock('react-redux', () => ({
const mockUserContext = {
acknowledgement: {
force_active_checks: true,
persistent: true,
sticky: false,
},
......@@ -285,10 +285,8 @@ describe(Actions, () => {
fireEvent.click(getByText(labelAcknowledge));
const notifyCheckbox = await findByLabelText(labelNotify);
const persistentCheckbox = await findByLabelText(labelPersistent);
fireEvent.click(notifyCheckbox);
fireEvent.click(persistentCheckbox);
fireEvent.click(getByLabelText(labelAcknowledgeServices));
mockedAxios.get.mockResolvedValueOnce({ data: {} });
......@@ -302,8 +300,9 @@ describe(Actions, () => {
{
acknowledgement: {
comment: labelAcknowledgedByAdmin,
force_active_checks: true,
is_notify_contacts: true,
is_persistent_comment: false,
is_persistent_comment: true,
is_sticky: false,
with_services: true,
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment