diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-11-08 10:17:49 +0000 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2017-11-08 10:17:49 +0000 |
commit | 8c497e74094e5982c7ffc962d89089b79e1315ea (patch) | |
tree | bb0e659c7a7949a85a66122ac9399d4576645fec /spec/javascripts/clusters_spec.js | |
parent | d4035c1132792a7e9cd40ed3be4d0b2f78411d90 (diff) | |
parent | b579cc7620dad1d406e974cce2d9ad5a4ce58a57 (diff) | |
download | gitlab-ce-38395-mr-widget-ci.tar.gz |
Merge branch 'master' into 38395-mr-widget-ci38395-mr-widget-ci
* master: (120 commits)
Remove comments in JSON.
Add changelog
Adds typescript support in webpack. With Mike G.
Add note on registry restrictions on GitLab.com
fix karma config file
Remove truncate mixin
Update mr_widget_options_spec.js
Change cursor to pointer on hover
Simplify design for no tags, branches
Cleanup tests
Improve GitLab Import rake task to work with Hashed Storage and Subgroups
Upgrade vendored templates
Remove EE-specific group paths
Check redirecting with a querystring
Update failure message when finding new routes in `PathRegex`
Free up some group reserved words
Free up `avatar`, `group_members` and `milestones` as paths
Free up `labels` as a group name
Add helper methods to redirect legacy paths
Fix db/schema.rb
...
Diffstat (limited to 'spec/javascripts/clusters_spec.js')
-rw-r--r-- | spec/javascripts/clusters_spec.js | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/spec/javascripts/clusters_spec.js b/spec/javascripts/clusters_spec.js deleted file mode 100644 index eb1cd6eb804..00000000000 --- a/spec/javascripts/clusters_spec.js +++ /dev/null @@ -1,79 +0,0 @@ -import Clusters from '~/clusters'; - -describe('Clusters', () => { - let cluster; - preloadFixtures('clusters/show_cluster.html.raw'); - - beforeEach(() => { - loadFixtures('clusters/show_cluster.html.raw'); - cluster = new Clusters(); - }); - - describe('toggle', () => { - it('should update the button and the input field on click', () => { - cluster.toggleButton.click(); - - expect( - cluster.toggleButton.classList, - ).not.toContain('checked'); - - expect( - cluster.toggleInput.getAttribute('value'), - ).toEqual('false'); - }); - }); - - describe('updateContainer', () => { - describe('when creating cluster', () => { - it('should show the creating container', () => { - cluster.updateContainer('creating'); - - expect( - cluster.creatingContainer.classList.contains('hidden'), - ).toBeFalsy(); - expect( - cluster.successContainer.classList.contains('hidden'), - ).toBeTruthy(); - expect( - cluster.errorContainer.classList.contains('hidden'), - ).toBeTruthy(); - }); - }); - - describe('when cluster is created', () => { - it('should show the success container', () => { - cluster.updateContainer('created'); - - expect( - cluster.creatingContainer.classList.contains('hidden'), - ).toBeTruthy(); - expect( - cluster.successContainer.classList.contains('hidden'), - ).toBeFalsy(); - expect( - cluster.errorContainer.classList.contains('hidden'), - ).toBeTruthy(); - }); - }); - - describe('when cluster has error', () => { - it('should show the error container', () => { - cluster.updateContainer('errored', 'this is an error'); - - expect( - cluster.creatingContainer.classList.contains('hidden'), - ).toBeTruthy(); - expect( - cluster.successContainer.classList.contains('hidden'), - ).toBeTruthy(); - expect( - cluster.errorContainer.classList.contains('hidden'), - ).toBeFalsy(); - - expect( - cluster.errorReasonContainer.textContent, - ).toContain('this is an error'); - }); - }); - }); -}); |