diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-07-10 08:11:04 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-07-10 08:11:04 +0000 |
commit | d79cef3a9a5577765d975326fbf4bc1b8c5634de (patch) | |
tree | fad8dce6f89102fda75f511dee80b7fae7675994 /spec/javascripts | |
parent | ca1deb9e5ec1429a65d73b3352d1207301f9fc6f (diff) | |
download | gitlab-ce-d79cef3a9a5577765d975326fbf4bc1b8c5634de.tar.gz |
Support manually stopping any environment from the UI
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/environments/environment_rollback_spec.js | 4 | ||||
-rw-r--r-- | spec/javascripts/environments/environment_stop_spec.js | 12 |
2 files changed, 4 insertions, 12 deletions
diff --git a/spec/javascripts/environments/environment_rollback_spec.js b/spec/javascripts/environments/environment_rollback_spec.js index eb8e49d81fe..79f33c5bc8a 100644 --- a/spec/javascripts/environments/environment_rollback_spec.js +++ b/spec/javascripts/environments/environment_rollback_spec.js @@ -18,7 +18,7 @@ describe('Rollback Component', () => { }, }).$mount(); - expect(component.$el.querySelector('span').textContent).toContain('Re-deploy'); + expect(component.$el).toHaveSpriteIcon('repeat'); }); it('Should render Rollback label when isLastDeployment is false', () => { @@ -30,6 +30,6 @@ describe('Rollback Component', () => { }, }).$mount(); - expect(component.$el.querySelector('span').textContent).toContain('Rollback'); + expect(component.$el).toHaveSpriteIcon('redo'); }); }); diff --git a/spec/javascripts/environments/environment_stop_spec.js b/spec/javascripts/environments/environment_stop_spec.js index 3f95faf466a..4d9caa57566 100644 --- a/spec/javascripts/environments/environment_stop_spec.js +++ b/spec/javascripts/environments/environment_stop_spec.js @@ -4,7 +4,6 @@ import stopComp from '~/environments/components/environment_stop.vue'; describe('Stop Component', () => { let StopComponent; let component; - const stopURL = '/stop'; beforeEach(() => { StopComponent = Vue.extend(stopComp); @@ -12,20 +11,13 @@ describe('Stop Component', () => { component = new StopComponent({ propsData: { - stopUrl: stopURL, + environment: {}, }, }).$mount(); }); - describe('computed', () => { - it('title', () => { - expect(component.title).toEqual('Stop'); - }); - }); - it('should render a button to stop the environment', () => { expect(component.$el.tagName).toEqual('BUTTON'); - expect(component.$el.getAttribute('data-original-title')).toEqual('Stop'); - expect(component.$el.getAttribute('aria-label')).toEqual('Stop'); + expect(component.$el.getAttribute('data-original-title')).toEqual('Stop environment'); }); }); |