diff options
author | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-09 21:03:09 +0300 |
---|---|---|
committer | Johann Hubert Sonntagbauer <johann.sonntagbauer@gmail.com> | 2018-10-17 07:57:29 +0300 |
commit | 6f5723a169b5d400c136dbd844fc54c68e5f8563 (patch) | |
tree | e7bad2648366ed5943293655a0abe23367e869a6 /spec/javascripts/deploy_keys | |
parent | 28d412e5b2b8499fba22e8fabb1d44f44449228e (diff) |
enable jasmine/new-line-before-expect
Diffstat (limited to 'spec/javascripts/deploy_keys')
-rw-r--r-- | spec/javascripts/deploy_keys/components/app_spec.js | 3 | ||||
-rw-r--r-- | spec/javascripts/deploy_keys/components/key_spec.js | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/javascripts/deploy_keys/components/app_spec.js b/spec/javascripts/deploy_keys/components/app_spec.js index cd147bb2935..df36d1989d2 100644 --- a/spec/javascripts/deploy_keys/components/app_spec.js +++ b/spec/javascripts/deploy_keys/components/app_spec.js @@ -60,6 +60,7 @@ describe('Deploy keys app component', () => { expect(textContent('.js-deployKeys-tab-available_project_keys')).toContain( 'Privately accessible deploy keys', ); + expect(textContent('.js-deployKeys-tab-public_keys')).toContain( 'Publicly accessible deploy keys', ); @@ -67,9 +68,11 @@ describe('Deploy keys app component', () => { expect(textContent('.js-deployKeys-tab-enabled_keys .badge')).toBe( `${vm.store.keys.enabled_keys.length}`, ); + expect(textContent('.js-deployKeys-tab-available_project_keys .badge')).toBe( `${vm.store.keys.available_project_keys.length}`, ); + expect(textContent('.js-deployKeys-tab-public_keys .badge')).toBe( `${vm.store.keys.public_keys.length}`, ); diff --git a/spec/javascripts/deploy_keys/components/key_spec.js b/spec/javascripts/deploy_keys/components/key_spec.js index d1de9d132b8..7117dc4a9ee 100644 --- a/spec/javascripts/deploy_keys/components/key_spec.js +++ b/spec/javascripts/deploy_keys/components/key_spec.js @@ -82,6 +82,7 @@ describe('Deploy keys key', () => { it('shows expandable button if more than two projects', () => { const labels = vm.$el.querySelectorAll('.deploy-project-label'); + expect(labels.length).toBe(2); expect(labels[1].textContent).toContain('others'); expect(labels[1].getAttribute('data-original-title')).toContain('Expand'); @@ -93,6 +94,7 @@ describe('Deploy keys key', () => { Vue.nextTick(() => { const labels = vm.$el.querySelectorAll('.deploy-project-label'); + expect(labels.length).toBe(length); expect(labels[1].textContent).not.toContain(`+${length} others`); expect(labels[1].getAttribute('data-original-title')).not.toContain('Expand'); @@ -105,6 +107,7 @@ describe('Deploy keys key', () => { Vue.nextTick(() => { const labels = vm.$el.querySelectorAll('.deploy-project-label'); + expect(labels.length).toBe(2); expect(labels[1].textContent).toContain( vm.deployKey.deploy_keys_projects[1].project.full_name, |