提交 f9a662c3 编写于 作者: F Filipa Lacerda

Changes for stop url to path

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册