Commit efd7dde9 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Minor fix modal button variant

parent 7260ed2b
......@@ -86,7 +86,6 @@ export default {
onSubmit() {
const { name } = this;
return this.createValueStream({ name }).then(() => {
this.$refs.modal.hide();
this.$toast.show(sprintf(__("'%{name}' Value Stream created"), { name }), {
position: 'top-center',
});
......@@ -141,7 +140,7 @@ export default {
:action-primary="{
text: __('Create value stream'),
attributes: [
{ variant: 'primary' },
{ variant: 'success' },
{
disabled: !isValid,
},
......
......@@ -13,7 +13,6 @@ describe('ValueStreamSelect', () => {
const createValueStreamMock = jest.fn(() => Promise.resolve());
const mockEvent = { preventDefault: jest.fn() };
const mockModalHide = jest.fn();
const mockToastShow = jest.fn();
const fakeStore = ({ initialState = {} }) =>
......@@ -110,7 +109,6 @@ describe('ValueStreamSelect', () => {
beforeEach(() => {
wrapper = createComponent({ data: { name: streamName } });
wrapper.vm.$refs.modal.hide = mockModalHide;
});
it('submit button is enabled', () => {
......@@ -135,10 +133,6 @@ describe('ValueStreamSelect', () => {
position: 'top-center',
});
});
it('hides the modal', () => {
expect(mockModalHide).toHaveBeenCalled();
});
});
describe('form submission fails', () => {
......@@ -151,7 +145,6 @@ describe('ValueStreamSelect', () => {
createValueStream: () => createValueStreamMockFail,
},
});
wrapper.vm.$refs.modal.hide = mockModalHide;
});
it('does not clear the name field', () => {
......@@ -161,10 +154,6 @@ describe('ValueStreamSelect', () => {
it('does not display a toast message', () => {
expect(mockToastShow).not.toHaveBeenCalled();
});
it('does not hide the modal', () => {
expect(mockModalHide).not.toHaveBeenCalled();
});
});
});
});
......
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