2012-09-10 17:35:03 +02:00
|
|
|
module SharedPaths
|
|
|
|
include Spinach::DSL
|
|
|
|
|
2012-09-26 04:34:29 +02:00
|
|
|
When 'I visit new project page' do
|
|
|
|
visit new_project_path
|
|
|
|
end
|
|
|
|
|
2012-10-22 20:42:06 +02:00
|
|
|
# ----------------------------------------
|
|
|
|
# Group
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
When 'I visit group page' do
|
|
|
|
visit group_path(current_group)
|
|
|
|
end
|
|
|
|
|
|
|
|
When 'I visit group issues page' do
|
|
|
|
visit issues_group_path(current_group)
|
|
|
|
end
|
|
|
|
|
|
|
|
When 'I visit group merge requests page' do
|
|
|
|
visit merge_requests_group_path(current_group)
|
|
|
|
end
|
|
|
|
|
2012-12-25 23:52:49 +01:00
|
|
|
When 'I visit group people page' do
|
|
|
|
visit people_group_path(current_group)
|
|
|
|
end
|
|
|
|
|
2013-02-01 18:04:11 +01:00
|
|
|
When 'I visit group settings page' do
|
|
|
|
visit edit_group_path(current_group)
|
|
|
|
end
|
|
|
|
|
2012-09-26 02:11:57 +02:00
|
|
|
# ----------------------------------------
|
|
|
|
# Dashboard
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
Given 'I visit dashboard page' do
|
|
|
|
visit dashboard_path
|
|
|
|
end
|
|
|
|
|
2013-01-27 14:41:35 +01:00
|
|
|
Given 'I visit dashboard projects page' do
|
|
|
|
visit projects_dashboard_path
|
|
|
|
end
|
|
|
|
|
2012-09-26 02:11:57 +02:00
|
|
|
Given 'I visit dashboard issues page' do
|
2013-01-27 13:10:42 +01:00
|
|
|
visit issues_dashboard_path
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
2012-09-26 02:11:57 +02:00
|
|
|
Given 'I visit dashboard merge requests page' do
|
2013-01-27 13:10:42 +01:00
|
|
|
visit merge_requests_dashboard_path
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
2012-09-26 02:11:57 +02:00
|
|
|
Given 'I visit dashboard search page' do
|
|
|
|
visit search_path
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
2012-09-26 02:11:57 +02:00
|
|
|
Given 'I visit dashboard help page' do
|
|
|
|
visit help_path
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
2012-09-26 02:11:57 +02:00
|
|
|
# ----------------------------------------
|
|
|
|
# Profile
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2012-09-10 17:35:03 +02:00
|
|
|
Given 'I visit profile page' do
|
|
|
|
visit profile_path
|
|
|
|
end
|
|
|
|
|
2012-09-14 18:13:25 +02:00
|
|
|
Given 'I visit profile account page' do
|
2012-12-02 12:29:24 +01:00
|
|
|
visit account_profile_path
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
2012-09-26 02:11:57 +02:00
|
|
|
Given 'I visit profile SSH keys page' do
|
|
|
|
visit keys_path
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit profile design page' do
|
2012-12-02 12:29:24 +01:00
|
|
|
visit design_profile_path
|
2012-09-26 02:11:57 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit profile history page' do
|
2012-12-02 12:29:24 +01:00
|
|
|
visit history_profile_path
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
2012-09-26 02:11:57 +02:00
|
|
|
# ----------------------------------------
|
|
|
|
# Admin
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
Given 'I visit admin page' do
|
|
|
|
visit admin_root_path
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit admin projects page' do
|
|
|
|
visit admin_projects_path
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit admin users page' do
|
|
|
|
visit admin_users_path
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit admin logs page' do
|
|
|
|
visit admin_logs_path
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit admin hooks page' do
|
|
|
|
visit admin_hooks_path
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit admin Resque page' do
|
|
|
|
visit admin_resque_path
|
|
|
|
end
|
|
|
|
|
2012-10-22 20:42:06 +02:00
|
|
|
And 'I visit admin groups page' do
|
|
|
|
visit admin_groups_path
|
|
|
|
end
|
|
|
|
|
2013-01-19 18:11:11 +01:00
|
|
|
When 'I visit admin teams page' do
|
|
|
|
visit admin_teams_path
|
|
|
|
end
|
|
|
|
|
2012-09-26 04:34:29 +02:00
|
|
|
# ----------------------------------------
|
|
|
|
# Generic Project
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
Given "I visit my project's home page" do
|
|
|
|
visit project_path(@project)
|
|
|
|
end
|
|
|
|
|
2013-03-14 20:51:44 +01:00
|
|
|
Given "I visit my project's settings page" do
|
|
|
|
visit edit_project_path(@project)
|
|
|
|
end
|
|
|
|
|
2012-09-26 04:34:29 +02:00
|
|
|
Given "I visit my project's files page" do
|
2013-01-04 07:43:25 +01:00
|
|
|
visit project_tree_path(@project, root_ref)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
2012-09-26 04:34:29 +02:00
|
|
|
Given "I visit my project's commits page" do
|
2013-01-04 07:43:25 +01:00
|
|
|
visit project_commits_path(@project, root_ref, {limit: 5})
|
2012-09-26 04:34:29 +02:00
|
|
|
end
|
|
|
|
|
2012-11-01 22:57:44 +01:00
|
|
|
Given "I visit my project's commits page for a specific path" do
|
2013-01-04 07:43:25 +01:00
|
|
|
visit project_commits_path(@project, root_ref + "/app/models/project.rb", {limit: 5})
|
2012-11-01 22:57:44 +01:00
|
|
|
end
|
|
|
|
|
2012-11-10 22:33:10 +01:00
|
|
|
Given 'I visit my project\'s commits stats page' do
|
|
|
|
visit stats_project_repository_path(@project)
|
|
|
|
end
|
|
|
|
|
2012-09-26 04:34:29 +02:00
|
|
|
Given "I visit my project's network page" do
|
2013-03-07 07:42:30 +01:00
|
|
|
# Stub Graph max_size to speed up test (10 commits vs. 650)
|
|
|
|
Network::Graph.stub(max_count: 10)
|
2012-09-26 04:34:29 +02:00
|
|
|
|
2013-01-31 05:22:08 +01:00
|
|
|
visit project_graph_path(@project, root_ref)
|
2012-09-26 04:34:29 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given "I visit my project's issues page" do
|
|
|
|
visit project_issues_path(@project)
|
|
|
|
end
|
|
|
|
|
|
|
|
Given "I visit my project's merge requests page" do
|
|
|
|
visit project_merge_requests_path(@project)
|
|
|
|
end
|
|
|
|
|
|
|
|
Given "I visit my project's wall page" do
|
2013-03-19 13:39:32 +01:00
|
|
|
visit project_wall_path(@project)
|
2012-09-26 04:34:29 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given "I visit my project's wiki page" do
|
2013-03-10 22:37:26 +01:00
|
|
|
visit project_wiki_path(@project, :home)
|
2012-09-26 04:34:29 +02:00
|
|
|
end
|
|
|
|
|
2012-09-27 22:52:08 +02:00
|
|
|
When 'I visit project hooks page' do
|
|
|
|
visit project_hooks_path(@project)
|
|
|
|
end
|
|
|
|
|
2012-09-26 04:34:29 +02:00
|
|
|
# ----------------------------------------
|
|
|
|
# "Shop" Project
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2012-09-10 17:35:03 +02:00
|
|
|
And 'I visit project "Shop" page' do
|
|
|
|
visit project_path(project)
|
|
|
|
end
|
|
|
|
|
2013-01-09 06:14:05 +01:00
|
|
|
When 'I visit edit project "Shop" page' do
|
|
|
|
visit edit_project_path(project)
|
|
|
|
end
|
|
|
|
|
2012-09-10 17:35:03 +02:00
|
|
|
Given 'I visit project branches page' do
|
|
|
|
visit branches_project_repository_path(@project)
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit compare refs page' do
|
2012-09-26 05:13:19 +02:00
|
|
|
visit project_compare_index_path(@project)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project commits page' do
|
2013-01-04 07:43:25 +01:00
|
|
|
visit project_commits_path(@project, root_ref, {limit: 5})
|
2012-09-26 02:01:51 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project commits page for stable branch' do
|
|
|
|
visit project_commits_path(@project, 'stable', {limit: 5})
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project source page' do
|
2013-01-04 07:43:25 +01:00
|
|
|
visit project_tree_path(@project, root_ref)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit blob file from repo' do
|
2012-09-17 18:39:57 +02:00
|
|
|
visit project_tree_path(@project, File.join(ValidCommit::ID, ValidCommit::BLOB_FILE_PATH))
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project source page for "8470d70"' do
|
2012-09-17 18:39:57 +02:00
|
|
|
visit project_tree_path(@project, "8470d70")
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project tags page' do
|
|
|
|
visit tags_project_repository_path(@project)
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project commit page' do
|
|
|
|
visit project_commit_path(@project, ValidCommit::ID)
|
|
|
|
end
|
|
|
|
|
|
|
|
And 'I visit project "Shop" issues page' do
|
2013-02-25 09:28:59 +01:00
|
|
|
visit project_issues_path(project)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit issue page "Release 0.4"' do
|
|
|
|
issue = Issue.find_by_title("Release 0.4")
|
|
|
|
visit project_issue_path(issue.project, issue)
|
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project "Shop" labels page' do
|
2013-02-25 09:28:59 +01:00
|
|
|
visit project_labels_path(project)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit merge request page "Bug NS-04"' do
|
|
|
|
mr = MergeRequest.find_by_title("Bug NS-04")
|
|
|
|
visit project_merge_request_path(mr.project, mr)
|
|
|
|
end
|
|
|
|
|
2012-10-29 22:23:49 +01:00
|
|
|
Given 'I visit merge request page "Bug NS-05"' do
|
|
|
|
mr = MergeRequest.find_by_title("Bug NS-05")
|
|
|
|
visit project_merge_request_path(mr.project, mr)
|
|
|
|
end
|
|
|
|
|
2012-09-10 17:35:03 +02:00
|
|
|
And 'I visit project "Shop" merge requests page' do
|
2013-02-25 09:28:59 +01:00
|
|
|
visit project_merge_requests_path(project)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project "Shop" milestones page' do
|
2013-02-25 09:28:59 +01:00
|
|
|
visit project_milestones_path(project)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I visit project "Shop" team page' do
|
2013-02-25 09:28:59 +01:00
|
|
|
visit project_team_index_path(project)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Then 'I visit project "Shop" wall page' do
|
2013-03-19 13:58:58 +01:00
|
|
|
visit project_wall_path(project)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
Given 'I visit project wiki page' do
|
2013-03-10 22:37:26 +01:00
|
|
|
visit project_wiki_path(@project, :home)
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|
2013-01-04 07:43:25 +01:00
|
|
|
|
|
|
|
def root_ref
|
|
|
|
@project.repository.root_ref
|
|
|
|
end
|
2013-02-25 09:28:59 +01:00
|
|
|
|
|
|
|
def project
|
|
|
|
project = Project.find_by_name!("Shop")
|
|
|
|
end
|
2012-09-10 17:35:03 +02:00
|
|
|
end
|