diff options
author | Rémy Coutable <remy@rymai.me> | 2016-03-15 15:20:54 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-03-15 16:55:40 +0300 |
commit | 1714883107b7b8b8f2ef8c2836acc2866362738e (patch) | |
tree | 4c79d81c52b932c20d0ddfb467175f39e281faf3 /features/steps | |
parent | ea7d062fa60e3e622288237fc66a815348bbcf36 (diff) |
Revert "Merge branch 'avatar-cropping' into 'master'
"
This reverts commit 01160fc06182de89c400af174861f6545ad6ceb8, reversing
changes made to 4bff9daf8b6d85e9c78565e21cfaa3f6d36f0282.
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/profile/profile.rb | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb index d9436e9e21a..bf9534be8be 100644 --- a/features/steps/profile/profile.rb +++ b/features/steps/profile/profile.rb @@ -27,7 +27,9 @@ class Spinach::Features::Profile < Spinach::FeatureSteps end step 'I change my avatar' do - attach_avatar + attach_file(:user_avatar, File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')) + click_button "Update profile settings" + @user.reload end step 'I should see new avatar' do @@ -40,7 +42,9 @@ class Spinach::Features::Profile < Spinach::FeatureSteps end step 'I have an avatar' do - attach_avatar + attach_file(:user_avatar, File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif')) + click_button "Update profile settings" + @user.reload end step 'I remove my avatar' do @@ -229,16 +233,4 @@ class Spinach::Features::Profile < Spinach::FeatureSteps step "I see that application is removed" do expect(page.find(".oauth-applications")).not_to have_content "test_changed" end - - def attach_avatar - attach_file :user_avatar, Rails.root.join(*%w(spec fixtures banana_sample.gif)) - - page.find('#user_avatar_crop_x', visible: false).set('0') - page.find('#user_avatar_crop_y', visible: false).set('0') - page.find('#user_avatar_crop_size', visible: false).set('256') - - click_button "Update profile settings" - - @user.reload - end end |