diff options
author | Alexander Randa <randa.alex@gmail.com> | 2017-03-31 15:54:38 +0300 |
---|---|---|
committer | Alexander Randa <randa.alex@gmail.com> | 2017-06-02 19:44:36 +0300 |
commit | 3d70eeb5bb9dac8073a149547dc3b85c90d65e7d (patch) | |
tree | b925f3518e991df59a094ae9d7a6926241c9f5aa /spec/javascripts/deploy_keys | |
parent | f07aee72bef4604312e11a43fce3a47865bce100 (diff) |
Implement ability to update deploy keys
Diffstat (limited to 'spec/javascripts/deploy_keys')
-rw-r--r-- | spec/javascripts/deploy_keys/components/key_spec.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/spec/javascripts/deploy_keys/components/key_spec.js b/spec/javascripts/deploy_keys/components/key_spec.js index 793ab8c451d..a4b98f6140d 100644 --- a/spec/javascripts/deploy_keys/components/key_spec.js +++ b/spec/javascripts/deploy_keys/components/key_spec.js @@ -39,9 +39,15 @@ describe('Deploy keys key', () => { ).toBe(`created ${gl.utils.getTimeago().format(deployKey.created_at)}`); }); + it('shows edit button', () => { + expect( + vm.$el.querySelectorAll('.btn')[0].textContent.trim(), + ).toBe('Edit'); + }); + it('shows remove button', () => { expect( - vm.$el.querySelector('.btn').textContent.trim(), + vm.$el.querySelectorAll('.btn')[1].textContent.trim(), ).toBe('Remove'); }); @@ -71,9 +77,15 @@ describe('Deploy keys key', () => { setTimeout(done); }); + it('shows edit button', () => { + expect( + vm.$el.querySelectorAll('.btn')[0].textContent.trim(), + ).toBe('Edit'); + }); + it('shows enable button', () => { expect( - vm.$el.querySelector('.btn').textContent.trim(), + vm.$el.querySelectorAll('.btn')[1].textContent.trim(), ).toBe('Enable'); }); @@ -82,7 +94,7 @@ describe('Deploy keys key', () => { Vue.nextTick(() => { expect( - vm.$el.querySelector('.btn').textContent.trim(), + vm.$el.querySelectorAll('.btn')[1].textContent.trim(), ).toBe('Disable'); done(); |