diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-11-13 12:21:26 -0600 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2017-11-27 09:19:39 -0600 |
commit | 2e2f0675c97ba233ab089922b231a7aac97d633a (patch) | |
tree | 2925de63e045fd0284fe8fe257ac07c6402a0b3e /spec/helpers | |
parent | d19019ec926be2be066af7cae3ec8118be1062ab (diff) | |
download | gitlab-ce-2e2f0675c97ba233ab089922b231a7aac97d633a.tar.gz |
UX adjustments and spec corrections
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/button_helper_spec.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/helpers/button_helper_spec.rb b/spec/helpers/button_helper_spec.rb index e5158761333..b5222f301ba 100644 --- a/spec/helpers/button_helper_spec.rb +++ b/spec/helpers/button_helper_spec.rb @@ -26,9 +26,10 @@ describe ButtonHelper do context 'when user has password automatically set' do let(:user) { create(:user, password_automatically_set: true) } - it 'shows a password tooltip' do - expect(element.attr('class')).to include(has_tooltip_class) - expect(element.attr('data-title')).to eq('Set a password on your account to pull or push via HTTP.') + it 'shows the password text on the dropdown' do + expect(element.children.length).to eq(2) + expect(element.children[1].name).to eq('span') + expect(element.children[1].children[0].text).to eq('Set a password on your account to pull or push via HTTP.') end end end @@ -40,8 +41,9 @@ describe ButtonHelper do context 'when user has no personal access tokens' do it 'has a personal access token tooltip ' do - expect(element.attr('class')).to include(has_tooltip_class) - expect(element.attr('data-title')).to eq('Create a personal access token on your account to pull or push via HTTP.') + expect(element.children.length).to eq(2) + expect(element.children[1].name).to eq('span') + expect(element.children[1].children[0].text).to eq('Create a personal access token on your account to pull or push via HTTP.') end end |