Commit f9a662c3 authored by Filipa Lacerda's avatar Filipa Lacerda

Changes for stop url to path

parent d2007ee6
......@@ -13,12 +13,6 @@
},
},
computed: {
stopUrl() {
return this.stop_url;
},
},
methods: {
openConfirmDialog() {
return window.confirm('Are you sure you want to stop this environment?'); // eslint-disable-line
......@@ -28,7 +22,7 @@
template: `
<a v-on:click="openConfirmDialog"
class="btn stop-env-link"
:href="stopUrl"
:href="stop_url"
data-method="post"
rel="nofollow">
<i class="fa fa-stop stop-env-icon"></i>
......
......@@ -16,20 +16,4 @@ describe('Stop Component', () => {
});
expect(component.$el.getAttribute('href')).toEqual(stopURL);
});
describe('When clicked', () => {
it('Should open popup with confirmation warning', () => {
const component = new window.gl.environmentsList.StopComponent({
el: document.querySelector('.test-dom-element'),
propsData: {
stop_url: '#',
},
});
var confirm = spyOn(window, 'confirm');
confirm.and.returnValue(false);
component.$el.click();
expect(confirm).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