diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-10-29 15:50:49 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-10-29 15:50:49 +0100 |
commit | 0ea38dc519b86d2bd2e14f1df1baf0fffc043af6 (patch) | |
tree | 8dc3643e810cb4e272cb767337b212782e2f5976 /features | |
parent | f24324adbea1f7df20e77647b1df7085cba51a95 (diff) | |
parent | 6d0337a97a9d21a27bdd96b48ae17d2458b4ad46 (diff) | |
download | gitlab-ce-0ea38dc519b86d2bd2e14f1df1baf0fffc043af6.tar.gz |
Merge branch 'binford2k/gitlab-ce-feature/create_new_directories'
Diffstat (limited to 'features')
-rw-r--r-- | features/project/source/browse_files.feature | 10 | ||||
-rw-r--r-- | features/steps/project/source/browse_files.rb | 15 |
2 files changed, 25 insertions, 0 deletions
diff --git a/features/project/source/browse_files.feature b/features/project/source/browse_files.feature index 6b0484b6a38..69aa79f2d24 100644 --- a/features/project/source/browse_files.feature +++ b/features/project/source/browse_files.feature @@ -91,6 +91,16 @@ Feature: Project Source Browse Files And I see a commit error message @javascript + Scenario: I can create file with a directory name + Given I click on "New file" link in repo + And I fill the new file name with a new directory + And I edit code + And I fill the commit message + And I click on "Commit changes" + Then I am redirected to the new file with directory + And I should see its new content + + @javascript Scenario: I can edit file Given I click on ".gitignore" file in repo And I click button "Edit" diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb index 1b27500497a..84725b9b585 100644 --- a/features/steps/project/source/browse_files.rb +++ b/features/steps/project/source/browse_files.rb @@ -78,6 +78,10 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps fill_in :file_name, with: 'Spaces Not Allowed' end + step 'I fill the new file name with a new directory' do + fill_in :file_name, with: new_file_name_with_directory + end + step 'I fill the commit message' do fill_in :commit_message, with: 'Not yet a commit message.', visible: true end @@ -238,6 +242,11 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps @project.namespace, @project, 'master/' + new_file_name)) end + step 'I am redirected to the new file with directory' do + expect(current_path).to eq(namespace_project_blob_path( + @project.namespace, @project, 'master/' + new_file_name_with_directory)) + end + step 'I am redirected to the new file on new branch' do expect(current_path).to eq(namespace_project_blob_path( @project.namespace, @project, 'new_branch_name/' + new_file_name)) @@ -335,6 +344,12 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps 'not_a_file.md' end + # Constant value that is a valid filename with directory and + # not a filename present at root of the seed repository. + def new_file_name_with_directory + 'foo/bar/baz.txt' + end + # Constant value that is a valid directory and # not a directory present at root of the seed repository. def new_dir_name |