diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-05-28 18:02:04 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-05-28 18:02:04 +0300 |
commit | fcdf3931811845ee7b214ab8ad97118d7eb7adb8 (patch) | |
tree | b48cdf0bf1f631a9ea2bafeca9e8cbeeed7286d0 /spec/features/groups/group_settings_spec.rb | |
parent | ba6384e7c7aedc2402fee8d6f2feeee743e5c14f (diff) |
Fix tests after group settings page redesign
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/features/groups/group_settings_spec.rb')
-rw-r--r-- | spec/features/groups/group_settings_spec.rb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/spec/features/groups/group_settings_spec.rb b/spec/features/groups/group_settings_spec.rb index 1ce30015e81..bf329b0bb94 100644 --- a/spec/features/groups/group_settings_spec.rb +++ b/spec/features/groups/group_settings_spec.rb @@ -83,7 +83,7 @@ feature 'Edit group settings' do attach_file(:group_avatar, Rails.root.join('spec', 'fixtures', 'banana_sample.gif')) - expect { click_button 'Save group' }.to change { group.reload.avatar? }.to(true) + expect { save_group }.to change { group.reload.avatar? }.to(true) end it 'uploads new group avatar' do @@ -97,10 +97,19 @@ feature 'Edit group settings' do expect(page).not_to have_link('Remove avatar') end end -end -def update_path(new_group_path) - visit edit_group_path(group) - fill_in 'group_path', with: new_group_path - click_button 'Save group' + def update_path(new_group_path) + visit edit_group_path(group) + + page.within('.gs-advanced') do + fill_in 'group_path', with: new_group_path + click_button 'Change group path' + end + end + + def save_group + page.within('.gs-general') do + click_button 'Save group' + end + end end |