Commit b6251af4 authored by Douwe Maan's avatar Douwe Maan

Fix feature spec.

parent 95139a65
......@@ -42,7 +42,7 @@ Feature: Project Source Browse Files
And I fill the new branch name
And I click on "Upload 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
@javascript
......@@ -64,7 +64,7 @@ Feature: Project Source Browse Files
And I fill the commit message
And I fill the new branch name
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
@javascript
......@@ -134,7 +134,7 @@ Feature: Project Source Browse Files
And I fill the commit message
And I fill the new branch name
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
@javascript @wip
......@@ -154,7 +154,7 @@ Feature: Project Source Browse Files
And I fill the commit message
And I fill the new branch name
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
Scenario: I attempt to create an existing directory
......@@ -174,12 +174,12 @@ Feature: Project Source Browse Files
Then I see diff
@javascript
Scenario: I can remove file and commit
Scenario: I can delete file and commit
Given I click on ".gitignore" file in repo
And I see the ".gitignore"
And I click on "Remove"
And I click on "Delete"
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
And I don't see the ".gitignore"
......
......@@ -98,12 +98,12 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
click_button 'Create directory'
end
step 'I click on "Remove"' do
click_button 'Remove'
step 'I click on "Delete"' do
click_button 'Delete'
end
step 'I click on "Remove file"' do
click_button 'Remove file'
step 'I click on "Delete file"' do
click_button 'Delete file'
end
step 'I click on "Replace"' do
......@@ -142,7 +142,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
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"
end
......@@ -225,10 +225,6 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
expect(current_path).to eq(namespace_project_blob_path(@project.namespace, @project, 'master/.gitignore'))
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
expect(current_path).to(
eq(namespace_project_blob_path(@project.namespace, @project,
......@@ -247,20 +243,8 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
@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))
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))
step 'I am redirected to the new merge request page' do
expect(current_path).to eq(new_namespace_project_merge_request_path(@project.namespace, @project))
end
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