diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2017-03-14 07:29:49 +0100 |
---|---|---|
committer | jacopo-beschi-intersail <jacopo.beschi@intersail.it> | 2017-03-21 11:51:53 +0100 |
commit | 7b04b63eeb8e3d6730acec3045a54f95968b3dac (patch) | |
tree | ee8214a00a882236d7bb2756553354fc024d9c59 /spec/features/projects/blobs | |
parent | 0eff4f14ccae7d979e6fa20f0bb875e4591351e8 (diff) | |
download | gitlab-ce-7b04b63eeb8e3d6730acec3045a54f95968b3dac.tar.gz |
New directory from interface on existing branch
The user can create a new directory on a different branch than the
source branch when the branch already exists.
Diffstat (limited to 'spec/features/projects/blobs')
-rw-r--r-- | spec/features/projects/blobs/user_create_spec.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/spec/features/projects/blobs/user_create_spec.rb b/spec/features/projects/blobs/user_create_spec.rb index 03d08c12612..5686868a0c4 100644 --- a/spec/features/projects/blobs/user_create_spec.rb +++ b/spec/features/projects/blobs/user_create_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' feature 'New blob creation', feature: true, js: true do include WaitForAjax + include TargetBranchHelpers given(:user) { create(:user) } given(:role) { :developer } @@ -20,19 +21,6 @@ feature 'New blob creation', feature: true, js: true do execute_script("ace.edit('editor').setValue('#{content}')") end - def select_branch_index(index) - first('button.js-target-branch').click - wait_for_ajax - all('a[data-group="Branches"]')[index].click - end - - def create_new_branch(name) - first('button.js-target-branch').click - click_link 'Create new branch' - fill_in 'new_branch_name', with: name - click_button 'Create' - end - def commit_file click_button 'Commit Changes' end @@ -53,12 +41,12 @@ feature 'New blob creation', feature: true, js: true do context 'with different target branch' do background do edit_file - select_branch_index(0) + select_branch('feature') commit_file end scenario 'creates the blob in the different branch' do - expect(page).to have_content 'test' + expect(page).to have_content 'feature' expect(page).to have_content 'successfully created' end end |