diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-15 03:33:29 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-15 03:33:29 +0300 |
commit | b00f447db4d76d453aa65ebd743da3a6bbe281f2 (patch) | |
tree | 0dda43a1e20abfb04e4051327af80ff37cc0e97a /spec/features | |
parent | 8ae13c7a51556a3bd4aa2f0eefc2693972166aa8 (diff) |
Add `allowing_for_delay` helper method for feature specs
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/profiles/preferences_spec.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/features/profiles/preferences_spec.rb b/spec/features/profiles/preferences_spec.rb index 1f07fde7afc..69d15f41706 100644 --- a/spec/features/profiles/preferences_spec.rb +++ b/spec/features/profiles/preferences_spec.rb @@ -21,9 +21,10 @@ describe 'Profile > Preferences' do it 'updates their preference' do choose "user_theme_id_#{theme.id}" - visit page.current_path - - expect(page).to have_checked_field("user_theme_id_#{theme.id}") + allowing_for_delay do + visit page.current_path + expect(page).to have_checked_field("user_theme_id_#{theme.id}") + end end it 'reflects the changes immediately' do @@ -46,9 +47,10 @@ describe 'Profile > Preferences' do it 'updates their preference' do choose 'user_color_scheme_id_5' - visit page.current_path - - expect(page).to have_checked_field('user_color_scheme_id_5') + allowing_for_delay do + visit page.current_path + expect(page).to have_checked_field('user_color_scheme_id_5') + end end end |