Commit d1d38bce authored by samdbeckham's avatar samdbeckham

Adds a `.modal--hide-footer` class to the security modal so we can conditionally hide it with CSS

parent 33116299
......@@ -57,6 +57,7 @@ export default {
<modal
id="modal-mrwidget-security-issue"
:header-title-text="modal.title"
:class="{'modal--hide-footer': modal.vulnerability.resolved}"
class="modal-security-report-dast"
>
<slot>
......@@ -195,6 +196,7 @@ export default {
</div>
</slot>
<div slot="footer">
<template v-if="!modal.vulnerability.resolved">
<button
type="button"
class="btn btn-default"
......@@ -203,7 +205,6 @@ export default {
{{ __('Cancel' ) }}
</button>
<template v-if="!modal.vulnerability.resolved">
<loading-button
:loading="modal.isDismissingIssue"
:disabled="modal.isDismissingIssue"
......@@ -221,6 +222,7 @@ export default {
{{ __('View issue' ) }}
</a>
<loading-button
v-else
:loading="modal.isCreatingNewIssue"
:disabled="modal.isCreatingNewIssue"
:label="__('Create issue')"
......
......@@ -139,4 +139,9 @@
width: $modal-lg;
max-width: $modal-lg;
}
// This is temporary till we get the new modals hooked up
&.modal--hide-footer .modal-footer {
display: none;
}
}
......@@ -211,8 +211,8 @@ describe('Security Reports modal', () => {
});
});
it('does not render a button to dismiss issue', () => {
expect(vm.$el.querySelector('.js-dismiss-btn')).toBeFalsy();
it('does not display the footer', () => {
expect(vm.$el.classList.contains('modal--hide-footer')).toBeTruthy();
});
});
});
Markdown is supported
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