Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
f9a662c3
Commit
f9a662c3
authored
Nov 19, 2016
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes for stop url to path
parent
d2007ee6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
23 deletions
+1
-23
app/assets/javascripts/environments/components/environment_stop.js.es6
...vascripts/environments/components/environment_stop.js.es6
+1
-7
spec/javascripts/environments/environment_stop_spec.js.es6
spec/javascripts/environments/environment_stop_spec.js.es6
+0
-16
No files found.
app/assets/javascripts/environments/components/environment_stop.js.es6
View file @
f9a662c3
...
...
@@ -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="stop
U
rl"
:href="stop
_u
rl"
data-method="post"
rel="nofollow">
<i class="fa fa-stop stop-env-icon"></i>
...
...
spec/javascripts/environments/environment_stop_spec.js.es6
View file @
f9a662c3
...
...
@@ -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();
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment