diff options
Diffstat (limited to 'features/steps/project')
-rw-r--r-- | features/steps/project/archived.rb | 2 | ||||
-rw-r--r-- | features/steps/project/commits/commits.rb | 6 | ||||
-rw-r--r-- | features/steps/project/commits/user_lookup.rb | 4 | ||||
-rw-r--r-- | features/steps/project/create.rb | 2 | ||||
-rw-r--r-- | features/steps/project/deploy_keys.rb | 2 | ||||
-rw-r--r-- | features/steps/project/forked_merge_requests.rb | 8 | ||||
-rw-r--r-- | features/steps/project/graph.rb | 4 | ||||
-rw-r--r-- | features/steps/project/hooks.rb | 4 | ||||
-rw-r--r-- | features/steps/project/issues/issues.rb | 4 | ||||
-rw-r--r-- | features/steps/project/issues/labels.rb | 2 | ||||
-rw-r--r-- | features/steps/project/merge_requests.rb | 4 | ||||
-rw-r--r-- | features/steps/project/network_graph.rb | 2 | ||||
-rw-r--r-- | features/steps/project/redirects.rb | 6 | ||||
-rw-r--r-- | features/steps/project/services.rb | 2 | ||||
-rw-r--r-- | features/steps/project/snippets.rb | 2 | ||||
-rw-r--r-- | features/steps/project/source/browse_files.rb | 17 | ||||
-rw-r--r-- | features/steps/project/source/markdown_render.rb | 72 | ||||
-rw-r--r-- | features/steps/project/wiki.rb | 8 |
18 files changed, 77 insertions, 74 deletions
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 |