diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-04-06 16:36:38 +0000 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-04-06 16:36:38 +0000 |
commit | b42dc1a52b5687972262e634cad589345fe49373 (patch) | |
tree | 1786fb11cc0615674e2bc14338331d6e8ffc740f /features/steps | |
parent | 3f60fe1a6045bac777357aa0d962e1a11552468c (diff) | |
download | gitlab-ce-b42dc1a52b5687972262e634cad589345fe49373.tar.gz |
Linking to edit file directly
Diffstat (limited to 'features/steps')
-rw-r--r-- | features/steps/project/source/browse_files.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 5c47eaf0279..29f628763db 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -56,13 +56,17 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps end step 'I click button "Edit"' do - click_link 'Edit' + find('.js-edit-blob').click end step 'I cannot see the edit button' do expect(page).not_to have_link 'edit' end + step 'I click button "Fork"' do + click_link 'Fork' + end + step 'I can edit code' do set_new_content expect(evaluate_script('ace.edit("editor").getValue()')).to eq new_gitignore_content @@ -366,6 +370,12 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps end end + step 'I should see a Fork/Cancel combo' do + expect(page).to have_link 'Fork' + expect(page).to have_button 'Cancel' + expect(page).to have_content 'You don\'t have permission to edit this file. Try forking this project to edit the file.' + end + step 'I should see a notice about a new fork having been created' do expect(page).to have_content "You're not allowed to make changes to this project directly. A fork of this project has been created that you can make changes in, so you can submit a merge request." end |