diff options
author | Steven Thonus <steven@ln2.nl> | 2014-01-25 21:15:44 +0400 |
---|---|---|
committer | Hannes Rosenögger <123haynes@gmail.com> | 2015-01-24 20:51:16 +0300 |
commit | 42bac7f9f27b0e8fb113e452fc2106882262172d (patch) | |
tree | badf9efefbdf95e02cac54c48d1495cd062476e9 /features/steps/project | |
parent | c8c05edcd500c0a755cb6962b51f97381663bd1a (diff) |
adding avatar to project settings page added avatar removal show project avatar on dashboard, projects page, project page added rspec and feature tests added project avatar from repository new default project icon added added copying af avatar to forking of project added generated icon fixed avatar fork hound fix style fix test fix
Diffstat (limited to 'features/steps/project')
-rw-r--r-- | features/steps/project/project.rb | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index 5e7312d90ff..455539d7471 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -17,12 +17,53 @@ class Spinach::Features::Project < Spinach::FeatureSteps end step 'change project path settings' do - fill_in "project_path", with: "new-path" - click_button "Rename" + fill_in 'project_path', with: 'new-path' + click_button 'Rename' end step 'I should see project with new path settings' do - project.path.should == "new-path" + project.path.should == 'new-path' + end + + step 'I change the project avatar' do + attach_file( + :project_avatar, + File.join(Rails.root, 'public', 'gitlab_logo.png') + ) + click_button 'Save changes' + @project.reload + end + + step 'I should see new project avatar' do + @project.avatar.should be_instance_of AttachmentUploader + url = @project.avatar.url + url.should == "/uploads/project/avatar/#{ @project.id }/gitlab_logo.png" + end + + step 'I should see the "Remove avatar" button' do + page.should have_link('Remove avatar') + end + + step 'I have an project avatar' do + attach_file( + :project_avatar, + File.join(Rails.root, 'public', 'gitlab_logo.png') + ) + click_button 'Save changes' + @project.reload + end + + step 'I remove my project avatar' do + click_link 'Remove avatar' + @project.reload + end + + step 'I should see the default project avatar' do + @project.avatar?.should be_false + end + + step 'I should not see the "Remove avatar" button' do + page.should_not have_link('Remove avatar') end step 'I should see project "Shop" version' do |