Commit b6251af4 authored by Douwe Maan's avatar Douwe Maan

Fix feature spec.

parent 95139a65
...@@ -42,7 +42,7 @@ Feature: Project Source Browse Files ...@@ -42,7 +42,7 @@ Feature: Project Source Browse Files
And I fill the new branch name And I fill the new branch name
And I click on "Upload file" And I click on "Upload file"
Then I can see the new text file Then I can see the new text file
And I am redirected to the uploaded file on new branch And I am redirected to the new merge request page
And I can see the new commit message And I can see the new commit message
@javascript @javascript
...@@ -64,7 +64,7 @@ Feature: Project Source Browse Files ...@@ -64,7 +64,7 @@ Feature: Project Source Browse Files
And I fill the commit message And I fill the commit message
And I fill the new branch name And I fill the new branch name
And I click on "Commit Changes" And I click on "Commit Changes"
Then I am redirected to the new file on new branch Then I am redirected to the new merge request page
And I should see its new content And I should see its new content
@javascript @javascript
...@@ -134,7 +134,7 @@ Feature: Project Source Browse Files ...@@ -134,7 +134,7 @@ Feature: Project Source Browse Files
And I fill the commit message And I fill the commit message
And I fill the new branch name And I fill the new branch name
And I click on "Commit Changes" And I click on "Commit Changes"
Then I am redirected to the ".gitignore" on new branch Then I am redirected to the new merge request page
And I should see its new content And I should see its new content
@javascript @wip @javascript @wip
...@@ -154,7 +154,7 @@ Feature: Project Source Browse Files ...@@ -154,7 +154,7 @@ Feature: Project Source Browse Files
And I fill the commit message And I fill the commit message
And I fill the new branch name And I fill the new branch name
And I click on "Create directory" And I click on "Create directory"
Then I am redirected to the new directory Then I am redirected to the new merge request page
@javascript @javascript
Scenario: I attempt to create an existing directory Scenario: I attempt to create an existing directory
...@@ -174,12 +174,12 @@ Feature: Project Source Browse Files ...@@ -174,12 +174,12 @@ Feature: Project Source Browse Files
Then I see diff Then I see diff
@javascript @javascript
Scenario: I can remove file and commit Scenario: I can delete file and commit
Given I click on ".gitignore" file in repo Given I click on ".gitignore" file in repo
And I see the ".gitignore" And I see the ".gitignore"
And I click on "Remove" And I click on "Delete"
And I fill the commit message And I fill the commit message
And I click on "Remove file" And I click on "Delete file"
Then I am redirected to the files URL Then I am redirected to the files URL
And I don't see the ".gitignore" And I don't see the ".gitignore"
......
...@@ -98,12 +98,12 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -98,12 +98,12 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
click_button 'Create directory' click_button 'Create directory'
end end
step 'I click on "Remove"' do step 'I click on "Delete"' do
click_button 'Remove' click_button 'Delete'
end end
step 'I click on "Remove file"' do step 'I click on "Delete file"' do
click_button 'Remove file' click_button 'Delete file'
end end
step 'I click on "Replace"' do step 'I click on "Replace"' do
...@@ -142,7 +142,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -142,7 +142,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end end
step 'I can see new file page' do step 'I can see new file page' do
expect(page).to have_content "new file" expect(page).to have_content "Create New File"
expect(page).to have_content "Commit message" expect(page).to have_content "Commit message"
end end
...@@ -225,10 +225,6 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -225,10 +225,6 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
expect(current_path).to eq(namespace_project_blob_path(@project.namespace, @project, 'master/.gitignore')) expect(current_path).to eq(namespace_project_blob_path(@project.namespace, @project, 'master/.gitignore'))
end end
step 'I am redirected to the ".gitignore" on new branch' do
expect(current_path).to eq(namespace_project_blob_path(@project.namespace, @project, 'new_branch_name/.gitignore'))
end
step 'I am redirected to the permalink URL' do step 'I am redirected to the permalink URL' do
expect(current_path).to( expect(current_path).to(
eq(namespace_project_blob_path(@project.namespace, @project, eq(namespace_project_blob_path(@project.namespace, @project,
...@@ -247,20 +243,8 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps ...@@ -247,20 +243,8 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
@project.namespace, @project, 'master/' + new_file_name_with_directory)) @project.namespace, @project, 'master/' + new_file_name_with_directory))
end end
step 'I am redirected to the new file on new branch' do step 'I am redirected to the new merge request page' do
expect(current_path).to eq(namespace_project_blob_path( expect(current_path).to eq(new_namespace_project_merge_request_path(@project.namespace, @project))
@project.namespace, @project, 'new_branch_name/' + new_file_name))
end
step 'I am redirected to the uploaded file on new branch' do
expect(current_path).to eq(namespace_project_blob_path(
@project.namespace, @project,
'new_branch_name/' + File.basename(test_text_file)))
end
step 'I am redirected to the new directory' do
expect(current_path).to eq(namespace_project_tree_path(
@project.namespace, @project, 'new_branch_name/' + new_dir_name))
end end
step 'I am redirected to the root directory' do step 'I am redirected to the root directory' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment