diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-04-05 23:01:35 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2017-04-05 23:01:35 +0000 |
commit | e3ce5b642e3cff6920f443a34a2e9b0099e07a88 (patch) | |
tree | a4836f8df9bed0d38ebaa2ec09807be64b41ef98 /spec/javascripts/environments | |
parent | 08393ecaa65c3db5379da06d665e4e4b0ca28be4 (diff) | |
parent | 474236e85b0386cfad003c7c7669e49ad2341bec (diff) | |
download | gitlab-ce-e3ce5b642e3cff6920f443a34a2e9b0099e07a88.tar.gz |
Merge branch 'tc-fix-unplayable-build-action-404' into 'master'
Disable pipeline & environment actions that are not playable
Closes #25385 and #24601
See merge request !10052
Diffstat (limited to 'spec/javascripts/environments')
-rw-r--r-- | spec/javascripts/environments/environment_actions_spec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/javascripts/environments/environment_actions_spec.js b/spec/javascripts/environments/environment_actions_spec.js index 13840b42bd6..6348d97b0a5 100644 --- a/spec/javascripts/environments/environment_actions_spec.js +++ b/spec/javascripts/environments/environment_actions_spec.js @@ -19,6 +19,11 @@ describe('Actions Component', () => { name: 'foo', play_path: '#', }, + { + name: 'foo bar', + play_path: 'url', + playable: false, + }, ]; spy = jasmine.createSpy('spy').and.returnValue(Promise.resolve()); @@ -49,4 +54,14 @@ describe('Actions Component', () => { expect(spy).toHaveBeenCalledWith(actionsMock[0].play_path); }); + + it('should render a disabled action when it\'s not playable', () => { + expect( + component.$el.querySelector('.dropdown-menu li:last-child button').getAttribute('disabled'), + ).toEqual('disabled'); + + expect( + component.$el.querySelector('.dropdown-menu li:last-child button').classList.contains('disabled'), + ).toEqual(true); + }); }); |