Commit 9b034242 authored by Rémy Coutable's avatar Rémy Coutable

Use wait_for_requests instead of sleep 0.3

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 896aa2a1
......@@ -34,8 +34,8 @@ class Spinach::Features::AwardEmoji < Spinach::FeatureSteps
page.within '.awards' do
expect do
page.find('.js-emoji-btn.active').click
sleep 0.3
end.to change{ page.all(".award-control.js-emoji-btn").size }.from(3).to(2)
wait_for_requests
end.to change { page.all(".award-control.js-emoji-btn").size }.from(3).to(2)
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