Skip to content
Snippets Groups Projects
Commit 36c88888 authored by Filipa Lacerda's avatar Filipa Lacerda
Browse files

Changes for stop url to path

Former-commit-id: f9a662c3
parent ccffda0f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
@@ -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>
Loading
Loading
Loading
Loading
@@ -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();
});
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment