summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/steps/admin/projects.rb6
-rw-r--r--features/steps/dashboard/dashboard.rb2
-rw-r--r--features/steps/explore/projects.rb8
-rw-r--r--features/steps/groups.rb4
-rw-r--r--features/steps/project/archived.rb2
-rw-r--r--features/steps/project/commits/commits.rb6
-rw-r--r--features/steps/project/commits/user_lookup.rb4
-rw-r--r--features/steps/project/create.rb2
-rw-r--r--features/steps/project/deploy_keys.rb2
-rw-r--r--features/steps/project/forked_merge_requests.rb8
-rw-r--r--features/steps/project/graph.rb4
-rw-r--r--features/steps/project/hooks.rb4
-rw-r--r--features/steps/project/issues/issues.rb4
-rw-r--r--features/steps/project/issues/labels.rb2
-rw-r--r--features/steps/project/merge_requests.rb4
-rw-r--r--features/steps/project/network_graph.rb2
-rw-r--r--features/steps/project/redirects.rb6
-rw-r--r--features/steps/project/services.rb2
-rw-r--r--features/steps/project/snippets.rb2
-rw-r--r--features/steps/project/source/browse_files.rb17
-rw-r--r--features/steps/project/source/markdown_render.rb72
-rw-r--r--features/steps/project/wiki.rb8
-rw-r--r--features/steps/shared/paths.rb110
-rw-r--r--features/steps/shared/project.rb5
24 files changed, 145 insertions, 141 deletions
diff --git a/features/steps/admin/projects.rb b/features/steps/admin/projects.rb
index 2fd6385fe7b..9be4d39d2d5 100644
--- a/features/steps/admin/projects.rb
+++ b/features/steps/admin/projects.rb
@@ -15,17 +15,17 @@ class Spinach::Features::AdminProjects < Spinach::FeatureSteps
step 'I should see project details' do
project = Project.first
- current_path.should == admin_project_path(project)
+ current_path.should == admin_namespace_project_path(project.namespace, project)
page.should have_content(project.name_with_namespace)
page.should have_content(project.creator.name)
end
step 'I visit admin project page' do
- visit admin_project_path(project)
+ visit admin_namespace_project_path(project.namespace, project)
end
step 'I transfer project to group \'Web\'' do
- find(:xpath, "//input[@id='namespace_id']").set group.id
+ find(:xpath, "//input[@id='new_namespace_id']").set group.id
click_button 'Transfer'
end
diff --git a/features/steps/dashboard/dashboard.rb b/features/steps/dashboard/dashboard.rb
index 1826ead1d51..f9b1f18562a 100644
--- a/features/steps/dashboard/dashboard.rb
+++ b/features/steps/dashboard/dashboard.rb
@@ -21,7 +21,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
step 'I see prefilled new Merge Request page' do
- current_path.should == new_project_merge_request_path(@project)
+ current_path.should == new_namespace_project_merge_request_path(@project.namespace, @project)
find("#merge_request_target_project_id").value.should == @project.id.to_s
find("#merge_request_source_branch").value.should == "fix"
find("#merge_request_target_branch").value.should == "master"
diff --git a/features/steps/explore/projects.rb b/features/steps/explore/projects.rb
index 8172f7922cc..26b71406bd8 100644
--- a/features/steps/explore/projects.rb
+++ b/features/steps/explore/projects.rb
@@ -65,7 +65,7 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
title: "New feature",
project: public_project
)
- visit project_issues_path(public_project)
+ visit namespace_project_issues_path(public_project.namespace, public_project)
end
@@ -84,7 +84,7 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
title: "New internal feature",
project: internal_project
)
- visit project_issues_path(internal_project)
+ visit namespace_project_issues_path(internal_project.namespace, internal_project)
end
@@ -95,7 +95,7 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
end
step 'I visit "Community" merge requests page' do
- visit project_merge_requests_path(public_project)
+ visit namespace_project_merge_requests_path(public_project.namespace, public_project)
end
step 'project "Community" has "Bug fix" open merge request' do
@@ -112,7 +112,7 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
end
step 'I visit "Internal" merge requests page' do
- visit project_merge_requests_path(internal_project)
+ visit namespace_project_merge_requests_path(internal_project.namespace, internal_project)
end
step 'project "Internal" has "Feature implemented" open merge request' do
diff --git a/features/steps/groups.rb b/features/steps/groups.rb
index 610e7fd3a48..f44afb8cbe6 100644
--- a/features/steps/groups.rb
+++ b/features/steps/groups.rb
@@ -194,8 +194,8 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
step 'I should see group milestone with all issues and MRs assigned to that milestone' do
page.should have_content('Milestone GL-113')
page.should have_content('Progress: 0 closed – 4 open')
- page.should have_link(@issue1.title, href: project_issue_path(@project1, @issue1))
- page.should have_link(@mr3.title, href: project_merge_request_path(@project3, @mr3))
+ page.should have_link(@issue1.title, href: namespace_project_issue_path(@project1.namespace, @project1, @issue1))
+ page.should have_link(@mr3.title, href: namespace_project_merge_request_path(@project3.namespace, @project3, @mr3))
end
protected
diff --git a/features/steps/project/archived.rb b/features/steps/project/archived.rb
index afbf4d5950d..37ad0c77655 100644
--- a/features/steps/project/archived.rb
+++ b/features/steps/project/archived.rb
@@ -15,7 +15,7 @@ class Spinach::Features::ProjectArchived < Spinach::FeatureSteps
When 'I visit project "Forum" page' do
project = Project.find_by(name: "Forum")
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
step 'I should not see "Archived"' do
diff --git a/features/steps/project/commits/commits.rb b/features/steps/project/commits/commits.rb
index d515ee1ac11..b2dccf868b0 100644
--- a/features/steps/project/commits/commits.rb
+++ b/features/steps/project/commits/commits.rb
@@ -24,7 +24,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end
step 'I click on commit link' do
- visit project_commit_path(@project, sample_commit.id)
+ visit namespace_project_commit_path(@project.namespace, @project, sample_commit.id)
end
step 'I see commit info' do
@@ -58,7 +58,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
step 'I visit big commit page' do
Commit::DIFF_SAFE_FILES = 20
- visit project_commit_path(@project, sample_big_commit.id)
+ visit namespace_project_commit_path(@project.namespace, @project, sample_big_commit.id)
end
step 'I see big commit warning' do
@@ -68,7 +68,7 @@ class Spinach::Features::ProjectCommits < Spinach::FeatureSteps
end
step 'I visit a commit with an image that changed' do
- visit project_commit_path(@project, sample_image_commit.id)
+ visit namespace_project_commit_path(@project.namespace, @project, sample_image_commit.id)
end
step 'The diff links to both the previous and current image' do
diff --git a/features/steps/project/commits/user_lookup.rb b/features/steps/project/commits/user_lookup.rb
index 0622fef43bb..63ff84c82ef 100644
--- a/features/steps/project/commits/user_lookup.rb
+++ b/features/steps/project/commits/user_lookup.rb
@@ -4,11 +4,11 @@ class Spinach::Features::ProjectCommitsUserLookup < Spinach::FeatureSteps
include SharedPaths
step 'I click on commit link' do
- visit project_commit_path(@project, sample_commit.id)
+ visit namespace_project_commit_path(@project.namespace, @project, sample_commit.id)
end
step 'I click on another commit link' do
- visit project_commit_path(@project, sample_commit.parent_id)
+ visit namespace_project_commit_path(@project.namespace, @project, sample_commit.parent_id)
end
step 'I have user with primary email' do
diff --git a/features/steps/project/create.rb b/features/steps/project/create.rb
index 6b07b62f16f..6b85cf74f5f 100644
--- a/features/steps/project/create.rb
+++ b/features/steps/project/create.rb
@@ -9,7 +9,7 @@ class Spinach::Features::ProjectCreate < Spinach::FeatureSteps
step 'I should see project page' do
page.should have_content "Empty"
- current_path.should == project_path(Project.last)
+ current_path.should == namespace_project_path(Project.last.namespace, Project.last)
end
step 'I should see empty project instuctions' do
diff --git a/features/steps/project/deploy_keys.rb b/features/steps/project/deploy_keys.rb
index 914da31322f..4bf5cb5fa40 100644
--- a/features/steps/project/deploy_keys.rb
+++ b/features/steps/project/deploy_keys.rb
@@ -24,7 +24,7 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
step 'I should be on deploy keys page' do
- current_path.should == project_deploy_keys_path(@project)
+ current_path.should == namespace_project_deploy_keys_path(@project.namespace, @project)
end
step 'I should see newly created deploy key' do
diff --git a/features/steps/project/forked_merge_requests.rb b/features/steps/project/forked_merge_requests.rb
index a5484ad3a00..63ad90e1241 100644
--- a/features/steps/project/forked_merge_requests.rb
+++ b/features/steps/project/forked_merge_requests.rb
@@ -23,7 +23,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
step 'I should see merge request "Merge Request On Forked Project"' do
@project.merge_requests.size.should >= 1
@merge_request = @project.merge_requests.last
- current_path.should == project_merge_request_path(@project, @merge_request)
+ current_path.should == namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
@merge_request.title.should == "Merge Request On Forked Project"
@merge_request.source_project.should == @forked_project
@merge_request.source_branch.should == "fix"
@@ -64,7 +64,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step 'I see prefilled new Merge Request page for the forked project' do
- current_path.should == new_project_merge_request_path(@forked_project)
+ current_path.should == new_namespace_project_merge_request_path(@forked_project.namespace, @forked_project)
find("#merge_request_source_project_id").value.should == @forked_project.id.to_s
find("#merge_request_target_project_id").value.should == @project.id.to_s
find("#merge_request_source_branch").value.should have_content "new_design"
@@ -86,7 +86,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
page.should have_content "An Edited Forked Merge Request"
@project.merge_requests.size.should >= 1
@merge_request = @project.merge_requests.last
- current_path.should == project_merge_request_path(@project, @merge_request)
+ current_path.should == namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
@merge_request.source_project.should == @forked_project
@merge_request.source_branch.should == "fix"
@merge_request.target_branch.should == "master"
@@ -106,7 +106,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
end
step 'I see the edit page prefilled for "Merge Request On Forked Project"' do
- current_path.should == edit_project_merge_request_path(@project, @merge_request)
+ current_path.should == edit_namespace_project_merge_request_path(@project.namespace, @project, @merge_request)
page.should have_content "Edit merge request ##{@merge_request.id}"
find("#merge_request_title").value.should == "Merge Request On Forked Project"
end
diff --git a/features/steps/project/graph.rb b/features/steps/project/graph.rb
index ba460ac8097..bc07c3d413c 100644
--- a/features/steps/project/graph.rb
+++ b/features/steps/project/graph.rb
@@ -8,12 +8,12 @@ class Spinach::Features::ProjectGraph < Spinach::FeatureSteps
When 'I visit project "Shop" graph page' do
project = Project.find_by(name: "Shop")
- visit project_graph_path(project, "master")
+ visit namespace_project_graph_path(project.namespace, project, "master")
end
step 'I visit project "Shop" commits graph page' do
project = Project.find_by(name: "Shop")
- visit commits_project_graph_path(project, "master")
+ visit commits_namespace_project_graph_path(project.namespace, project, "master")
end
step 'page should have commits graphs' do
diff --git a/features/steps/project/hooks.rb b/features/steps/project/hooks.rb
index f4b8d372be8..4b135202593 100644
--- a/features/steps/project/hooks.rb
+++ b/features/steps/project/hooks.rb
@@ -29,7 +29,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
end
step 'I should see newly created hook' do
- current_path.should == project_hooks_path(current_project)
+ current_path.should == namespace_project_hooks_path(current_project.namespace, current_project)
page.should have_content(@url)
end
@@ -44,7 +44,7 @@ class Spinach::Features::ProjectHooks < Spinach::FeatureSteps
end
step 'hook should be triggered' do
- current_path.should == project_hooks_path(current_project)
+ current_path.should == namespace_project_hooks_path(current_project.namespace, current_project)
page.should have_selector '.flash-notice',
text: 'Hook successfully executed.'
end
diff --git a/features/steps/project/issues/issues.rb b/features/steps/project/issues/issues.rb
index c0ae5208541..6d72c93ad13 100644
--- a/features/steps/project/issues/issues.rb
+++ b/features/steps/project/issues/issues.rb
@@ -168,7 +168,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
When 'I visit empty project page' do
project = Project.find_by(name: 'Empty Project')
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
step 'I see empty project details with ssh clone info' do
@@ -180,7 +180,7 @@ class Spinach::Features::ProjectIssues < Spinach::FeatureSteps
When "I visit empty project's issues page" do
project = Project.find_by(name: 'Empty Project')
- visit project_issues_path(project)
+ visit namespace_project_issues_path(project.namespace, project)
end
step 'I leave a comment with code block' do
diff --git a/features/steps/project/issues/labels.rb b/features/steps/project/issues/labels.rb
index 3e3e90824b4..6ce34c500c6 100644
--- a/features/steps/project/issues/labels.rb
+++ b/features/steps/project/issues/labels.rb
@@ -4,7 +4,7 @@ class Spinach::Features::ProjectIssuesLabels < Spinach::FeatureSteps
include SharedPaths
step 'I visit \'bug\' label edit page' do
- visit edit_project_label_path(project, bug_label)
+ visit edit_namespace_project_label_path(project.namespace, project, bug_label)
end
step 'I remove label \'bug\'' do
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index 6f421de1aba..e477444023d 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -101,11 +101,11 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
end
step 'I switch to the diff tab' do
- visit diffs_project_merge_request_path(project, merge_request)
+ visit diffs_namespace_project_merge_request_path(project.namespace, project, merge_request)
end
step 'I switch to the merge request\'s comments tab' do
- visit project_merge_request_path(project, merge_request)
+ visit namespace_project_merge_request_path(project.namespace, project, merge_request)
end
step 'I click on the commit in the merge request' do
diff --git a/features/steps/project/network_graph.rb b/features/steps/project/network_graph.rb
index 14fdc72b8b6..a15688ace6a 100644
--- a/features/steps/project/network_graph.rb
+++ b/features/steps/project/network_graph.rb
@@ -12,7 +12,7 @@ class Spinach::Features::ProjectNetworkGraph < Spinach::FeatureSteps
Network::Graph.stub(max_count: 10)
project = Project.find_by(name: "Shop")
- visit project_network_path(project, "master")
+ visit namespace_project_network_path(project.namespace, project, "master")
end
step 'page should select "master" in select box' do
diff --git a/features/steps/project/redirects.rb b/features/steps/project/redirects.rb
index e2badccbcf4..57c6e39c801 100644
--- a/features/steps/project/redirects.rb
+++ b/features/steps/project/redirects.rb
@@ -13,7 +13,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
step 'I visit project "Community" page' do
project = Project.find_by(name: 'Community')
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
step 'I should see project "Community" home page' do
@@ -25,12 +25,12 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
step 'I visit project "Enterprise" page' do
project = Project.find_by(name: 'Enterprise')
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
step 'I visit project "CommunityDoesNotExist" page' do
project = Project.find_by(name: 'Community')
- visit project_path(project) + 'DoesNotExist'
+ visit namespace_project_path(project.namespace, project) + 'DoesNotExist'
end
step 'I click on "Sign In"' do
diff --git a/features/steps/project/services.rb b/features/steps/project/services.rb
index 957a16d06a8..3307117e69a 100644
--- a/features/steps/project/services.rb
+++ b/features/steps/project/services.rb
@@ -4,7 +4,7 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps
include SharedPaths
step 'I visit project "Shop" services page' do
- visit project_services_path(@project)
+ visit namespace_project_services_path(@project.namespace, @project)
end
step 'I should see list of available services' do
diff --git a/features/steps/project/snippets.rb b/features/steps/project/snippets.rb
index 4a39bfdbb79..343aeb53b11 100644
--- a/features/steps/project/snippets.rb
+++ b/features/steps/project/snippets.rb
@@ -86,7 +86,7 @@ class Spinach::Features::ProjectSnippets < Spinach::FeatureSteps
end
step 'I visit snippet page "Snippet one"' do
- visit project_snippet_path(project, project_snippet)
+ visit namespace_project_snippet_path(project.namespace, project, project_snippet)
end
def project_snippet
diff --git a/features/steps/project/source/browse_files.rb b/features/steps/project/source/browse_files.rb
index 1fe01e55aa4..98d8a60e1a5 100644
--- a/features/steps/project/source/browse_files.rb
+++ b/features/steps/project/source/browse_files.rb
@@ -11,7 +11,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I should see files from repository for "6d39438"' do
- current_path.should == project_tree_path(@project, "6d39438")
+ current_path.should == namespace_project_tree_path(@project.namespace, @project, "6d39438")
page.should have_content ".gitignore"
page.should have_content "LICENSE"
end
@@ -141,21 +141,24 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
step 'I am redirected to the files URL' do
- current_path.should == project_tree_path(@project, 'master')
+ current_path.should == namespace_project_tree_path(@project.namespace, @project, 'master')
end
step 'I am redirected to the ".gitignore"' do
- expect(current_path).to eq(project_blob_path(@project, 'master/.gitignore'))
+ expect(current_path).to eq(namespace_project_blob_path(@project.namespace, @project, 'master/.gitignore'))
end
step 'I am redirected to the permalink URL' do
- expect(current_path).to eq(project_blob_path(
- @project, @project.repository.commit.sha + '/.gitignore'))
+ expect(current_path).to(
+ eq(namespace_project_blob_path(@project.namespace, @project,
+ @project.repository.commit.sha +
+ '/.gitignore'))
+ )
end
step 'I am redirected to the new file' do
- expect(current_path).to eq(project_blob_path(
- @project, 'master/' + new_file_name))
+ expect(current_path).to eq(namespace_project_blob_path(
+ @project.namespace, @project, 'master/' + new_file_name))
end
step "I don't see the permalink link" do
diff --git a/features/steps/project/source/markdown_render.rb b/features/steps/project/source/markdown_render.rb
index 53578ee5970..7961fdedad8 100644
--- a/features/steps/project/source/markdown_render.rb
+++ b/features/steps/project/source/markdown_render.rb
@@ -13,7 +13,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I should see files from repository in markdown' do
- current_path.should == project_tree_path(@project, "markdown")
+ current_path.should == namespace_project_tree_path(@project.namespace, @project, "markdown")
page.should have_content "README.md"
page.should have_content "CHANGELOG"
end
@@ -33,7 +33,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I should see correct document rendered' do
- current_path.should == project_blob_path(@project, "markdown/doc/api/README.md")
+ current_path.should == namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/README.md")
page.should have_content "All API requests require authentication"
end
@@ -42,7 +42,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I should see correct directory rendered' do
- current_path.should == project_tree_path(@project, "markdown/doc/raketasks")
+ current_path.should == namespace_project_tree_path(@project.namespace, @project, "markdown/doc/raketasks")
page.should have_content "backup_restore.md"
page.should have_content "maintenance.md"
end
@@ -52,7 +52,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I should see correct doc/api directory rendered' do
- current_path.should == project_tree_path(@project, "markdown/doc/api")
+ current_path.should == namespace_project_tree_path(@project.namespace, @project, "markdown/doc/api")
page.should have_content "README.md"
page.should have_content "users.md"
end
@@ -62,7 +62,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I should see correct maintenance file rendered' do
- current_path.should == project_blob_path(@project, "markdown/doc/raketasks/maintenance.md")
+ current_path.should == namespace_project_blob_path(@project.namespace, @project, "markdown/doc/raketasks/maintenance.md")
page.should have_content "bundle exec rake gitlab:env:info RAILS_ENV=production"
end
@@ -93,7 +93,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I see correct file rendered' do
- current_path.should == project_blob_path(@project, "markdown/doc/api/README.md")
+ current_path.should == namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/README.md")
page.should have_content "Contents"
page.should have_link "Users"
page.should have_link "Rake tasks"
@@ -104,7 +104,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I should see the correct document file' do
- current_path.should == project_blob_path(@project, "markdown/doc/api/users.md")
+ current_path.should == namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/users.md")
page.should have_content "Get a list of users."
end
@@ -115,100 +115,100 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
# Markdown branch
When 'I visit markdown branch' do
- visit project_tree_path(@project, "markdown")
+ visit namespace_project_tree_path(@project.namespace, @project, "markdown")
end
When 'I visit markdown branch "README.md" blob' do
- visit project_blob_path(@project, "markdown/README.md")
+ visit namespace_project_blob_path(@project.namespace, @project, "markdown/README.md")
end
When 'I visit markdown branch "d" tree' do
- visit project_tree_path(@project, "markdown/d")
+ visit namespace_project_tree_path(@project.namespace, @project, "markdown/d")
end
When 'I visit markdown branch "d/README.md" blob' do
- visit project_blob_path(@project, "markdown/d/README.md")
+ visit namespace_project_blob_path(@project.namespace, @project, "markdown/d/README.md")
end
step 'I should see files from repository in markdown branch' do
- current_path.should == project_tree_path(@project, "markdown")
+ current_path.should == namespace_project_tree_path(@project.namespace, @project, "markdown")
page.should have_content "README.md"
page.should have_content "CHANGELOG"
end
step 'I see correct file rendered in markdown branch' do
- current_path.should == project_blob_path(@project, "markdown/doc/api/README.md")
+ current_path.should == namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/README.md")
page.should have_content "Contents"
page.should have_link "Users"
page.should have_link "Rake tasks"
end
step 'I should see correct document rendered for markdown branch' do
- current_path.should == project_blob_path(@project, "markdown/doc/api/README.md")
+ current_path.should == namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/README.md")
page.should have_content "All API requests require authentication"
end
step 'I should see correct directory rendered for markdown branch' do
- current_path.should == project_tree_path(@project, "markdown/doc/raketasks")
+ current_path.should == namespace_project_tree_path(@project.namespace, @project, "markdown/doc/raketasks")
page.should have_content "backup_restore.md"
page.should have_content "maintenance.md"
end
step 'I should see the users document file in markdown branch' do
- current_path.should == project_blob_path(@project, "markdown/doc/api/users.md")
+ current_path.should == namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/users.md")
page.should have_content "Get a list of users."
end
# Expected link contents
step 'The link with text "empty" should have url "tree/markdown"' do
- find('a', text: /^empty$/)['href'] == current_host + project_tree_path(@project, "markdown")
+ find('a', text: /^empty$/)['href'] == current_host + namespace_project_tree_path(@project.namespace, @project, "markdown")
end
step 'The link with text "empty" should have url "blob/markdown/README.md"' do
- find('a', text: /^empty$/)['href'] == current_host + project_blob_path(@project, "markdown/README.md")
+ find('a', text: /^empty$/)['href'] == current_host + namespace_project_blob_path(@project.namespace, @project, "markdown/README.md")
end
step 'The link with text "empty" should have url "tree/markdown/d"' do
- find('a', text: /^empty$/)['href'] == current_host + project_tree_path(@project, "markdown/d")
+ find('a', text: /^empty$/)['href'] == current_host + namespace_project_tree_path(@project.namespace, @project, "markdown/d")
end
step 'The link with text "empty" should have '\
'url "blob/markdown/d/README.md"' do
- find('a', text: /^empty$/)['href'] == current_host + project_blob_path(@project, "markdown/d/README.md")
+ find('a', text: /^empty$/)['href'] == current_host + namespace_project_blob_path(@project.namespace, @project, "markdown/d/README.md")
end
step 'The link with text "ID" should have url "tree/markdownID"' do
- find('a', text: /^#id$/)['href'] == current_host + project_tree_path(@project, "markdown") + '#id'
+ find('a', text: /^#id$/)['href'] == current_host + namespace_project_tree_path(@project.namespace, @project, "markdown") + '#id'
end
step 'The link with text "/ID" should have url "tree/markdownID"' do
- find('a', text: /^\/#id$/)['href'] == current_host + project_tree_path(@project, "markdown") + '#id'
+ find('a', text: /^\/#id$/)['href'] == current_host + namespace_project_tree_path(@project.namespace, @project, "markdown") + '#id'
end
step 'The link with text "README.mdID" '\
'should have url "blob/markdown/README.mdID"' do
- find('a', text: /^README.md#id$/)['href'] == current_host + project_blob_path(@project, "markdown/README.md") + '#id'
+ find('a', text: /^README.md#id$/)['href'] == current_host + namespace_project_blob_path(@project.namespace, @project, "markdown/README.md") + '#id'
end
step 'The link with text "d/README.mdID" should have '\
'url "blob/markdown/d/README.mdID"' do
- find('a', text: /^d\/README.md#id$/)['href'] == current_host + project_blob_path(@project, "d/markdown/README.md") + '#id'
+ find('a', text: /^d\/README.md#id$/)['href'] == current_host + namespace_project_blob_path(@project.namespace, @project, "d/markdown/README.md") + '#id'
end
step 'The link with text "ID" should have url "blob/markdown/README.mdID"' do
- find('a', text: /^#id$/)['href'] == current_host + project_blob_path(@project, "markdown/README.md") + '#id'
+ find('a', text: /^#id$/)['href'] == current_host + namespace_project_blob_path(@project.namespace, @project, "markdown/README.md") + '#id'
end
step 'The link with text "/ID" should have url "blob/markdown/README.mdID"' do
- find('a', text: /^\/#id$/)['href'] == current_host + project_blob_path(@project, "markdown/README.md") + '#id'
+ find('a', text: /^\/#id$/)['href'] == current_host + namespace_project_blob_path(@project.namespace, @project, "markdown/README.md") + '#id'
end
# Wiki
step 'I go to wiki page' do
click_link "Wiki"
- current_path.should == project_wiki_path(@project, "home")
+ current_path.should == namespace_project_wiki_path(@project.namespace, @project, "home")
end
step 'I add various links to the wiki page' do
@@ -218,7 +218,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'Wiki page should have added links' do
- current_path.should == project_wiki_path(@project, "home")
+ current_path.should == namespace_project_wiki_path(@project.namespace, @project, "home")
page.should have_content "test GitLab API doc Rake tasks"
end
@@ -237,13 +237,13 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I see new wiki page named test' do
- current_path.should == project_wiki_path(@project, "test")
+ current_path.should == namespace_project_wiki_path(@project.namespace, @project, "test")
page.should have_content "Editing"
end
When 'I go back to wiki page home' do
- visit project_wiki_path(@project, "home")
- current_path.should == project_wiki_path(@project, "home")
+ visit namespace_project_wiki_path(@project.namespace, @project, "home")
+ current_path.should == namespace_project_wiki_path(@project.namespace, @project, "home")
end
step 'I click on GitLab API doc link' do
@@ -251,7 +251,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I see Gitlab API document' do
- current_path.should == project_wiki_path(@project, "api")
+ current_path.should == namespace_project_wiki_path(@project.namespace, @project, "api")
page.should have_content "Editing"
end
@@ -260,13 +260,13 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I see Rake tasks directory' do
- current_path.should == project_wiki_path(@project, "raketasks")
+ current_path.should == namespace_project_wiki_path(@project.namespace, @project, "raketasks")
page.should have_content "Editing"
end
step 'I go directory which contains README file' do
- visit project_tree_path(@project, "markdown/doc/api")
- current_path.should == project_tree_path(@project, "markdown/doc/api")
+ visit namespace_project_tree_path(@project.namespace, @project, "markdown/doc/api")
+ current_path.should == namespace_project_tree_path(@project.namespace, @project, "markdown/doc/api")
end
step 'I click on a relative link in README' do
@@ -274,7 +274,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
end
step 'I should see the correct markdown' do
- current_path.should == project_blob_path(@project, "markdown/doc/api/users.md")
+ current_path.should == namespace_project_blob_path(@project.namespace, @project, "markdown/doc/api/users.md")
page.should have_content "List users"
end
diff --git a/features/steps/project/wiki.rb b/features/steps/project/wiki.rb
index aa00818c602..cd7d5eac243 100644
--- a/features/steps/project/wiki.rb
+++ b/features/steps/project/wiki.rb
@@ -11,7 +11,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
step 'I should be redirected back to the Edit Home Wiki page' do
- current_path.should == project_wiki_path(project, :home)
+ current_path.should == namespace_project_wiki_path(project.namespace, project, :home)
end
step 'I create the Wiki Home page' do
@@ -33,7 +33,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
step 'I browse to that Wiki page' do
- visit project_wiki_path(project, @page)
+ visit namespace_project_wiki_path(project.namespace, project, @page)
end
step 'I click on the Edit button' do
@@ -50,7 +50,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
step 'I should be redirected back to that Wiki page' do
- current_path.should == project_wiki_path(project, @page)
+ current_path.should == namespace_project_wiki_path(project.namespace, project, @page)
end
step 'That page has two revisions' do
@@ -90,7 +90,7 @@ class Spinach::Features::ProjectWiki < Spinach::FeatureSteps
end
step 'I browse to wiki page with images' do
- visit project_wiki_path(project, @wiki_page)
+ visit namespace_project_wiki_path(project.namespace, project, @wiki_page)
end
step 'I click on existing image link' do
diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb
index cef48c179b2..835b644e6c7 100644
--- a/features/steps/shared/paths.rb
+++ b/features/steps/shared/paths.rb
@@ -136,7 +136,7 @@ module SharedPaths
end
step 'I visit admin projects page' do
- visit admin_projects_path
+ visit admin_namespaces_projects_path
end
step 'I visit admin users page' do
@@ -180,59 +180,59 @@ module SharedPaths
# ----------------------------------------
step "I visit my project's home page" do
- visit project_path(@project)
+ visit namespace_project_path(@project.namespace, @project)
end
step "I visit my project's settings page" do
- visit edit_project_path(@project)
+ visit edit_namespace_project_path(@project.namespace, @project)
end
step "I visit my project's files page" do
- visit project_tree_path(@project, root_ref)
+ visit namespace_project_tree_path(@project.namespace, @project, root_ref)
end
step 'I visit a binary file in the repo' do
- visit project_blob_path(@project, File.join(
+ visit namespace_project_blob_path(@project.namespace, @project, File.join(
root_ref, 'files/images/logo-black.png'))
end
step "I visit my project's commits page" do
- visit project_commits_path(@project, root_ref, {limit: 5})
+ visit namespace_project_commits_path(@project.namespace, @project, root_ref, {limit: 5})
end
step "I visit my project's commits page for a specific path" do
- visit project_commits_path(@project, root_ref + "/app/models/project.rb", {limit: 5})
+ visit namespace_project_commits_path(@project.namespace, @project, root_ref + "/app/models/project.rb", {limit: 5})
end
step 'I visit my project\'s commits stats page' do
- visit stats_project_repository_path(@project)
+ visit stats_namespace_project_repository_path(@project.namespace, @project)
end
step "I visit my project's network page" do
# Stub Graph max_size to speed up test (10 commits vs. 650)
Network::Graph.stub(max_count: 10)
- visit project_network_path(@project, root_ref)
+ visit namespace_project_network_path(@project.namespace, @project, root_ref)
end
step "I visit my project's issues page" do
- visit project_issues_path(@project)
+ visit namespace_project_issues_path(@project.namespace, @project)
end
step "I visit my project's merge requests page" do
- visit project_merge_requests_path(@project)
+ visit namespace_project_merge_requests_path(@project.namespace, @project)
end
step "I visit my project's wiki page" do
- visit project_wiki_path(@project, :home)
+ visit namespace_project_wiki_path(@project.namespace, @project, :home)
end
step 'I visit project hooks page' do
- visit project_hooks_path(@project)
+ visit namespace_project_hooks_path(@project.namespace, @project)
end
step 'I visit project deploy keys page' do
- visit project_deploy_keys_path(@project)
+ visit namespace_project_deploy_keys_path(@project.namespace, @project)
end
# ----------------------------------------
@@ -240,153 +240,153 @@ module SharedPaths
# ----------------------------------------
step 'I visit project "Shop" page' do
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
step 'I visit project "Forked Shop" merge requests page' do
- visit project_merge_requests_path(@forked_project)
+ visit namespace_project_merge_requests_path(@forked_project.namespace, @forked_project)
end
step 'I visit edit project "Shop" page' do
- visit edit_project_path(project)
+ visit edit_namespace_project_path(project.namespace, project)
end
step 'I visit project branches page' do
- visit project_branches_path(@project)
+ visit namespace_project_branches_path(@project.namespace, @project)
end
step 'I visit project protected branches page' do
- visit project_protected_branches_path(@project)
+ visit namespace_project_protected_branches_path(@project.namespace, @project)
end
step 'I visit compare refs page' do
- visit project_compare_index_path(@project)
+ visit namespace_project_compare_index_path(@project.namespace, @project)
end
step 'I visit project commits page' do
- visit project_commits_path(@project, root_ref, {limit: 5})
+ visit namespace_project_commits_path(@project.namespace, @project, root_ref, {limit: 5})
end
step 'I visit project commits page for stable branch' do
- visit project_commits_path(@project, 'stable', {limit: 5})
+ visit namespace_project_commits_path(@project.namespace, @project, 'stable', {limit: 5})
end
step 'I visit project source page' do
- visit project_tree_path(@project, root_ref)
+ visit namespace_project_tree_path(@project.namespace, @project, root_ref)
end
step 'I visit blob file from repo' do
- visit project_blob_path(@project, File.join(sample_commit.id, sample_blob.path))
+ visit namespace_project_blob_path(@project.namespace, @project, File.join(sample_commit.id, sample_blob.path))
end
step 'I visit ".gitignore" file in repo' do
- visit project_blob_path(@project, File.join(root_ref, '.gitignore'))
+ visit namespace_project_blob_path(@project.namespace, @project, File.join(root_ref, '.gitignore'))
end
step 'I am on the new file page' do
- current_path.should eq(project_create_blob_path(@project, root_ref))
+ current_path.should eq(namespace_project_create_blob_path(@project.namespace, @project, root_ref))
end
step 'I am on the ".gitignore" edit file page' do
- current_path.should eq(project_edit_blob_path(
- @project, File.join(root_ref, '.gitignore')))
+ current_path.should eq(namespace_project_edit_blob_path(
+ @project.namespace, @project, File.join(root_ref, '.gitignore')))
end
step 'I visit project source page for "6d39438"' do
- visit project_tree_path(@project, "6d39438")
+ visit namespace_project_tree_path(@project.namespace, @project, "6d39438")
end
step 'I visit project source page for' \
' "6d394385cf567f80a8fd85055db1ab4c5295806f"' do
- visit project_tree_path(@project,
+ visit namespace_project_tree_path(@project.namespace, @project,
'6d394385cf567f80a8fd85055db1ab4c5295806f')
end
step 'I visit project tags page' do
- visit project_tags_path(@project)
+ visit namespace_project_tags_path(@project.namespace, @project)
end
step 'I visit project commit page' do
- visit project_commit_path(@project, sample_commit.id)
+ visit namespace_project_commit_path(@project.namespace, @project, sample_commit.id)
end
step 'I visit project "Shop" issues page' do
- visit project_issues_path(project)
+ visit namespace_project_issues_path(project.namespace, project)
end
step 'I visit issue page "Release 0.4"' do
issue = Issue.find_by(title: "Release 0.4")
- visit project_issue_path(issue.project, issue)
+ visit namespace_project_issue_path(issue.project.namespace, issue.project, issue)
end
step 'I visit issue page "Tasks-open"' do
issue = Issue.find_by(title: 'Tasks-open')
- visit project_issue_path(issue.project, issue)
+ visit namespace_project_issue_path(issue.project.namespace, issue.project, issue)
end
step 'I visit issue page "Tasks-closed"' do
issue = Issue.find_by(title: 'Tasks-closed')
- visit project_issue_path(issue.project, issue)
+ visit namespace_project_issue_path(issue.project.namespace, issue.project, issue)
end
step 'I visit project "Shop" labels page' do
project = Project.find_by(name: 'Shop')
- visit project_labels_path(project)
+ visit namespace_project_labels_path(project.namespace, project)
end
step 'I visit project "Forum" labels page' do
project = Project.find_by(name: 'Forum')
- visit project_labels_path(project)
+ visit namespace_project_labels_path(project.namespace, project)
end
step 'I visit project "Shop" new label page' do
project = Project.find_by(name: 'Shop')
- visit new_project_label_path(project)
+ visit new_namespace_project_label_path(project.namespace, project)
end
step 'I visit project "Forum" new label page' do
project = Project.find_by(name: 'Forum')
- visit new_project_label_path(project)
+ visit new_namespace_project_label_path(project.namespace, project)
end
step 'I visit merge request page "Bug NS-04"' do
mr = MergeRequest.find_by(title: "Bug NS-04")
- visit project_merge_request_path(mr.target_project, mr)
+ visit namespace_project_merge_request_path(mr.target_project.namespace, mr.target_project, mr)
end
step 'I visit merge request page "Bug NS-05"' do
mr = MergeRequest.find_by(title: "Bug NS-05")
- visit project_merge_request_path(mr.target_project, mr)
+ visit namespace_project_merge_request_path(mr.target_project.namespace, mr.target_project, mr)
end
step 'I visit merge request page "MR-task-open"' do
mr = MergeRequest.find_by(title: 'MR-task-open')
- visit project_merge_request_path(mr.target_project, mr)
+ visit namespace_project_merge_request_path(mr.target_project.namespace, mr.target_project, mr)
end
step 'I visit merge request page "MR-task-closed"' do
mr = MergeRequest.find_by(title: 'MR-task-closed')
- visit project_merge_request_path(mr.target_project, mr)
+ visit namespace_project_merge_request_path(mr.target_project.namespace, mr.target_project, mr)
end
step 'I visit project "Shop" merge requests page' do
- visit project_merge_requests_path(project)
+ visit namespace_project_merge_requests_path(project.namespace, project)
end
step 'I visit forked project "Shop" merge requests page' do
- visit project_merge_requests_path(project)
+ visit namespace_project_merge_requests_path(project.namespace, project)
end
step 'I visit project "Shop" milestones page' do
- visit project_milestones_path(project)
+ visit namespace_project_milestones_path(project.namespace, project)
end
step 'I visit project "Shop" team page' do
- visit project_team_index_path(project)
+ visit namespace_project_team_index_path(project.namespace, project)
end
step 'I visit project wiki page' do
- visit project_wiki_path(@project, :home)
+ visit namespace_project_wiki_path(@project.namespace, @project, :home)
end
# ----------------------------------------
@@ -395,22 +395,22 @@ module SharedPaths
step 'I visit project "Community" page' do
project = Project.find_by(name: "Community")
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
step 'I visit project "Community" source page' do
project = Project.find_by(name: 'Community')
- visit project_tree_path(project, root_ref)
+ visit namespace_project_tree_path(project.namespace, project, root_ref)
end
step 'I visit project "Internal" page' do
project = Project.find_by(name: "Internal")
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
step 'I visit project "Enterprise" page' do
project = Project.find_by(name: "Enterprise")
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
# ----------------------------------------
@@ -419,7 +419,7 @@ module SharedPaths
step "I visit empty project page" do
project = Project.find_by(name: "Empty Public Project")
- visit project_path(project)
+ visit namespace_project_path(project.namespace, project)
end
# ----------------------------------------
@@ -447,7 +447,7 @@ module SharedPaths
# ----------------------------------------
step 'I visit project "Shop" snippets page' do
- visit project_snippets_path(project)
+ visit namespace_project_snippets_path(project.namespace, project)
end
step 'I visit snippets page' do
diff --git a/features/steps/shared/project.rb b/features/steps/shared/project.rb
index cf0be256231..41f71ae29cb 100644
--- a/features/steps/shared/project.rb
+++ b/features/steps/shared/project.rb
@@ -29,7 +29,8 @@ module SharedProject
end
step 'I visit my empty project page' do
- visit project_path(Project.find_by(name: 'Empty Project'))
+ project = Project.find_by(name: 'Empty Project')
+ visit namespace_project_path(project.namespace, project)
end
step 'project "Shop" has push event' do
@@ -64,7 +65,7 @@ module SharedProject
end
step 'I should see project settings' do
- current_path.should == edit_project_path(@project)
+ current_path.should == edit_namespace_project_path(@project.namespace, @project)
page.should have_content("Project name")
page.should have_content("Features:")
end