Commit 29b186e4 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'improve-award-emoji-spec' into 'master'

Improve award emoji test reliability and eliminate sleeps

Closes #14129

See merge request !3195
parents 3211d1cb a181722a
...@@ -13,7 +13,6 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps ...@@ -13,7 +13,6 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
thumbsup = page.first('.award-control') thumbsup = page.first('.award-control')
thumbsup.click thumbsup.click
thumbsup.hover thumbsup.hover
sleep 0.3
end end
end end
...@@ -46,12 +45,10 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps ...@@ -46,12 +45,10 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
end end
step 'I have award added' do step 'I have award added' do
sleep 0.2
page.within '.awards' do page.within '.awards' do
expect(page).to have_selector '.js-emoji-btn' 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 .js-counter')).to have_content '1'
expect(page.find('.js-emoji-btn.active')['data-original-title']).to eq('me') expect(page).to have_css(".js-emoji-btn.active[data-original-title='me']")
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment