diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2016-03-11 19:06:18 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-03-11 19:06:18 +0300 |
commit | 6968ea32e2beade8bc5aee9c30451b6ed48fcc5f (patch) | |
tree | 0f6ccc7805439a8ce52c9e144710a17e650e81b5 /features/steps | |
parent | 5a84e8381ac7e8dc0ecef7b7af83553161033e3c (diff) | |
parent | 25f392eab734bd68da377a61c608bca73355ba43 (diff) |
Merge branch 'award-emoji-design-update' into 'master'
Updated UI of award emoji
Closes #13878
See merge request !3028
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/project/issues/award_emoji.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/features/steps/project/issues/award_emoji.rb b/features/steps/project/issues/award_emoji.rb index 937fbbd34eb..135e1d016ae 100644 --- a/features/steps/project/issues/award_emoji.rb +++ b/features/steps/project/issues/award_emoji.rb @@ -10,7 +10,7 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps step 'I click the thumbsup award Emoji' do page.within '.awards' do - thumbsup = page.find('.award .emoji-1F44D') + thumbsup = page.first('.award-control') thumbsup.click thumbsup.hover sleep 0.3 @@ -18,23 +18,23 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps end step 'I click to emoji-picker' do - page.within '.awards-controls' do - page.find('.add-award').click + page.within '.awards' do + page.find('.js-add-award').click end end step 'I click to emoji in the picker' do page.within '.emoji-menu-content' do - page.first('.emoji-icon').click + page.first('.js-emoji-btn').click end end step 'I can remove it by clicking to icon' do page.within '.awards' do expect do - page.find('.award.active').click + page.find('.js-emoji-btn.active').click sleep 0.3 - end.to change{ page.all(".award").size }.from(3).to(2) + end.to change{ page.all(".award-control.js-emoji-btn").size }.from(3).to(2) end end @@ -49,23 +49,23 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps sleep 0.2 page.within '.awards' do - expect(page).to have_selector '.award' - expect(page.find('.award.active .counter')).to have_content '1' - expect(page.find('.award.active')['data-original-title']).to eq('me') + expect(page).to have_selector '.js-emoji-btn' + expect(page.find('.js-emoji-btn.active .js-counter')).to have_content '1' + expect(page.find('.js-emoji-btn.active')['data-original-title']).to eq('me') end end step 'I have no awards added' do page.within '.awards' do - expect(page).to have_selector '.award' - expect(page.all('.award').size).to eq(2) + expect(page).to have_selector '.award-control.js-emoji-btn' + expect(page.all('.award-control.js-emoji-btn').size).to eq(2) # Check tooltip data - page.all('.award').each do |element| + page.all('.award-control.js-emoji-btn').each do |element| expect(element['title']).to eq("") end - page.all('.award .counter').each do |element| + page.all('.award-control .js-counter').each do |element| expect(element).to have_content '0' end end |