2012-09-10 11:35:03 -04:00
|
|
|
module SharedPaths
|
|
|
|
include Spinach::DSL
|
2014-07-31 10:23:40 -04:00
|
|
|
include RepoHelpers
|
2014-12-26 11:33:53 -05:00
|
|
|
include DashboardHelper
|
2017-05-17 14:25:13 -04:00
|
|
|
include WaitForRequests
|
2012-09-10 11:35:03 -04:00
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit new project page' do
|
2012-09-25 22:34:29 -04:00
|
|
|
visit new_project_path
|
|
|
|
end
|
|
|
|
|
2016-02-22 14:49:16 -05:00
|
|
|
step 'I visit login page' do
|
|
|
|
visit new_user_session_path
|
|
|
|
end
|
|
|
|
|
2014-01-27 09:53:59 -05:00
|
|
|
# ----------------------------------------
|
|
|
|
# User
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
step 'I visit user "John Doe" page' do
|
|
|
|
visit user_path("john_doe")
|
|
|
|
end
|
|
|
|
|
2012-10-22 14:42:06 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# Group
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2014-02-07 11:59:55 -05:00
|
|
|
step 'I visit group "Owned" page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit group_path(Group.find_by(name: "Owned"))
|
2012-10-22 14:42:06 -04:00
|
|
|
end
|
|
|
|
|
2016-03-10 08:29:38 -05:00
|
|
|
step 'I visit group "Owned" activity page' do
|
|
|
|
visit activity_group_path(Group.find_by(name: "Owned"))
|
|
|
|
end
|
|
|
|
|
2014-02-07 11:59:55 -05:00
|
|
|
step 'I visit group "Owned" issues page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit issues_group_path(Group.find_by(name: "Owned"))
|
2012-10-22 14:42:06 -04:00
|
|
|
end
|
|
|
|
|
2014-02-07 11:59:55 -05:00
|
|
|
step 'I visit group "Owned" merge requests page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit merge_requests_group_path(Group.find_by(name: "Owned"))
|
2012-10-22 14:42:06 -04:00
|
|
|
end
|
|
|
|
|
2015-11-13 10:07:27 -05:00
|
|
|
step 'I visit group "Owned" milestones page' do
|
|
|
|
visit group_milestones_path(Group.find_by(name: "Owned"))
|
|
|
|
end
|
|
|
|
|
2014-02-07 11:59:55 -05:00
|
|
|
step 'I visit group "Owned" members page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit group_group_members_path(Group.find_by(name: "Owned"))
|
2012-12-25 17:52:49 -05:00
|
|
|
end
|
|
|
|
|
2014-02-07 11:59:55 -05:00
|
|
|
step 'I visit group "Owned" settings page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit edit_group_path(Group.find_by(name: "Owned"))
|
2014-02-07 11:59:55 -05:00
|
|
|
end
|
|
|
|
|
2015-08-18 11:46:57 -04:00
|
|
|
step 'I visit group "Owned" projects page' do
|
|
|
|
visit projects_group_path(Group.find_by(name: "Owned"))
|
|
|
|
end
|
|
|
|
|
2014-02-07 11:59:55 -05:00
|
|
|
step 'I visit group "Guest" page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit group_path(Group.find_by(name: "Guest"))
|
2014-02-07 11:59:55 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" issues page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit issues_group_path(Group.find_by(name: "Guest"))
|
2014-02-07 11:59:55 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" merge requests page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit merge_requests_group_path(Group.find_by(name: "Guest"))
|
2014-02-07 11:59:55 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" members page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit group_group_members_path(Group.find_by(name: "Guest"))
|
2014-02-07 11:59:55 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" settings page' do
|
2015-06-22 08:21:34 -04:00
|
|
|
visit edit_group_path(Group.find_by(name: "Guest"))
|
2013-02-01 12:04:11 -05:00
|
|
|
end
|
|
|
|
|
2012-09-25 20:11:57 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# Dashboard
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit dashboard page' do
|
2015-09-08 12:14:02 -04:00
|
|
|
visit dashboard_projects_path
|
2012-09-25 20:11:57 -04:00
|
|
|
end
|
|
|
|
|
2015-08-25 10:36:54 -04:00
|
|
|
step 'I visit dashboard activity page' do
|
|
|
|
visit activity_dashboard_path
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit dashboard projects page' do
|
2013-01-27 08:41:35 -05:00
|
|
|
visit projects_dashboard_path
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit dashboard issues page' do
|
2014-12-26 11:33:53 -05:00
|
|
|
visit assigned_issues_dashboard_path
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit dashboard merge requests page' do
|
2014-12-26 11:33:53 -05:00
|
|
|
visit assigned_mrs_dashboard_path
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit dashboard search page' do
|
2012-09-25 20:11:57 -04:00
|
|
|
visit search_path
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2015-04-15 05:13:49 -04:00
|
|
|
step 'I visit dashboard help page' do
|
|
|
|
visit help_path
|
|
|
|
end
|
|
|
|
|
2015-03-08 23:52:22 -04:00
|
|
|
step 'I visit dashboard groups page' do
|
|
|
|
visit dashboard_groups_path
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should be redirected to the dashboard groups page' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(current_path).to eq dashboard_groups_path
|
2015-03-09 17:25:14 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit dashboard starred projects page' do
|
|
|
|
visit starred_dashboard_projects_path
|
2015-03-08 23:52:22 -04:00
|
|
|
end
|
|
|
|
|
2012-09-25 20:11:57 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# Profile
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit profile page' do
|
2012-09-10 11:35:03 -04:00
|
|
|
visit profile_path
|
|
|
|
end
|
|
|
|
|
2014-12-25 11:46:19 -05:00
|
|
|
step 'I visit profile applications page' do
|
|
|
|
visit applications_profile_path
|
|
|
|
end
|
|
|
|
|
2013-10-09 10:01:04 -04:00
|
|
|
step 'I visit profile password page' do
|
|
|
|
visit edit_profile_password_path
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit profile account page' do
|
2013-10-09 10:01:04 -04:00
|
|
|
visit profile_account_path
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit profile SSH keys page' do
|
2013-06-24 11:24:14 -04:00
|
|
|
visit profile_keys_path
|
2012-09-25 20:11:57 -04:00
|
|
|
end
|
|
|
|
|
2015-06-05 14:00:21 -04:00
|
|
|
step 'I visit profile preferences page' do
|
|
|
|
visit profile_preferences_path
|
2012-09-25 20:11:57 -04:00
|
|
|
end
|
|
|
|
|
2017-05-16 08:54:57 -04:00
|
|
|
step 'I visit Authentication log page' do
|
2015-07-03 07:54:50 -04:00
|
|
|
visit audit_log_profile_path
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2012-09-25 20:11:57 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# Admin
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit admin page' do
|
2012-09-25 20:11:57 -04:00
|
|
|
visit admin_root_path
|
|
|
|
end
|
|
|
|
|
2015-08-06 10:57:04 -04:00
|
|
|
step 'I visit abuse reports page' do
|
|
|
|
visit admin_abuse_reports_path
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit admin projects page' do
|
2016-12-08 13:59:41 -05:00
|
|
|
visit admin_projects_path
|
2012-09-25 20:11:57 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit admin users page' do
|
2012-09-25 20:11:57 -04:00
|
|
|
visit admin_users_path
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit admin logs page' do
|
2012-09-25 20:11:57 -04:00
|
|
|
visit admin_logs_path
|
|
|
|
end
|
|
|
|
|
2013-11-12 07:32:17 -05:00
|
|
|
step 'I visit admin messages page' do
|
|
|
|
visit admin_broadcast_messages_path
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit admin hooks page' do
|
2012-09-25 20:11:57 -04:00
|
|
|
visit admin_hooks_path
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit admin Resque page' do
|
2013-05-30 04:44:35 -04:00
|
|
|
visit admin_background_jobs_path
|
2012-09-25 20:11:57 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit admin teams page' do
|
2013-01-19 12:11:11 -05:00
|
|
|
visit admin_teams_path
|
|
|
|
end
|
|
|
|
|
2016-01-09 14:30:34 -05:00
|
|
|
step 'I visit spam logs page' do
|
|
|
|
visit admin_spam_logs_path
|
|
|
|
end
|
|
|
|
|
2012-09-25 22:34:29 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# Generic Project
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's home page" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_path(@project)
|
2012-09-25 22:34:29 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's settings page" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit edit_project_path(@project)
|
2013-03-14 15:51:44 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's files page" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_tree_path(@project, root_ref)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2014-09-28 05:52:14 -04:00
|
|
|
step 'I visit a binary file in the repo' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_blob_path(@project,
|
2015-12-14 21:53:52 -05:00
|
|
|
File.join(root_ref, 'files/images/logo-black.png'))
|
2014-09-28 05:52:14 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's commits page" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_commits_path(@project, root_ref, { limit: 5 })
|
2012-09-25 22:34:29 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's commits page for a specific path" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_commits_path(@project, root_ref + "/app/models/project.rb", { limit: 5 })
|
2012-11-01 17:57:44 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit my project\'s commits stats page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit stats_project_repository_path(@project)
|
2012-11-10 16:33:10 -05:00
|
|
|
end
|
|
|
|
|
2017-03-02 12:57:01 -05:00
|
|
|
step "I visit my project's graph page" do
|
2013-03-07 01:42:30 -05:00
|
|
|
# Stub Graph max_size to speed up test (10 commits vs. 650)
|
|
|
|
Network::Graph.stub(max_count: 10)
|
2012-09-25 22:34:29 -04:00
|
|
|
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_network_path(@project, root_ref)
|
2012-09-25 22:34:29 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's issues page" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issues_path(@project)
|
2012-09-25 22:34:29 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's merge requests page" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_requests_path(@project)
|
2012-09-25 22:34:29 -04:00
|
|
|
end
|
|
|
|
|
2015-06-08 19:12:38 -04:00
|
|
|
step "I visit my project's members page" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_project_members_path(@project)
|
2015-06-08 19:12:38 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's wiki page" do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_wiki_path(@project, :home)
|
2012-09-25 22:34:29 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project hooks page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_settings_integrations_path(@project)
|
2012-09-27 16:52:08 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project deploy keys page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_deploy_keys_path(@project)
|
2013-05-06 08:09:41 -04:00
|
|
|
end
|
|
|
|
|
2016-01-07 06:56:18 -05:00
|
|
|
step 'I visit project find file page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_find_file_path(@project, root_ref)
|
2016-01-07 06:56:18 -05:00
|
|
|
end
|
|
|
|
|
2012-09-25 22:34:29 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# "Shop" Project
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project "Shop" page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_path(project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2015-07-08 14:22:42 -04:00
|
|
|
step 'I visit project "Shop" activity page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit activity_project_path(project)
|
2015-07-08 14:22:42 -04:00
|
|
|
end
|
|
|
|
|
2013-04-25 10:15:33 -04:00
|
|
|
step 'I visit project "Forked Shop" merge requests page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_requests_path(@forked_project)
|
2013-04-25 10:15:33 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit edit project "Shop" page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit edit_project_path(project)
|
2013-01-09 00:14:05 -05:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project branches page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_branches_path(@project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2014-05-24 07:20:12 -04:00
|
|
|
step 'I visit project protected branches page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_protected_branches_path(@project)
|
2014-05-24 07:20:12 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit compare refs page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_compare_index_path(@project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project commits page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_commits_path(@project, root_ref, { limit: 5 })
|
2012-09-25 20:01:51 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project commits page for stable branch' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_commits_path(@project, 'stable', { limit: 5 })
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit blob file from repo' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_blob_path(@project, File.join(sample_commit.id, sample_blob.path))
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2014-07-31 09:20:47 -04:00
|
|
|
step 'I visit ".gitignore" file in repo' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_blob_path(@project, File.join(root_ref, '.gitignore'))
|
2014-06-12 14:36:38 -04:00
|
|
|
end
|
|
|
|
|
2014-09-25 10:43:23 -04:00
|
|
|
step 'I am on the new file page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
expect(current_path).to eq(project_create_blob_path(@project, root_ref))
|
2014-09-25 10:43:23 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I am on the ".gitignore" edit file page' do
|
2015-12-14 21:53:52 -05:00
|
|
|
expect(current_path).to eq(
|
2017-06-29 13:06:35 -04:00
|
|
|
project_edit_blob_path(@project, File.join(root_ref, '.gitignore')))
|
2014-09-25 10:43:23 -04:00
|
|
|
end
|
|
|
|
|
2014-07-31 09:20:47 -04:00
|
|
|
step 'I visit project source page for "6d39438"' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_tree_path(@project, "6d39438")
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2014-08-08 10:03:58 -04:00
|
|
|
step 'I visit project source page for' \
|
|
|
|
' "6d394385cf567f80a8fd85055db1ab4c5295806f"' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_tree_path(@project,
|
2014-08-08 10:03:58 -04:00
|
|
|
'6d394385cf567f80a8fd85055db1ab4c5295806f')
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project tags page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_tags_path(@project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project commit page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_commit_path(@project, sample_commit.id)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project "Shop" issues page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issues_path(project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit issue page "Release 0.4"' do
|
2014-01-19 13:55:59 -05:00
|
|
|
issue = Issue.find_by(title: "Release 0.4")
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_issue_path(issue.project, issue)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project "Shop" labels page' do
|
2014-08-13 08:12:05 -04:00
|
|
|
project = Project.find_by(name: 'Shop')
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_labels_path(project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2014-08-13 08:12:05 -04:00
|
|
|
step 'I visit project "Forum" labels page' do
|
|
|
|
project = Project.find_by(name: 'Forum')
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_labels_path(project)
|
2014-08-13 08:12:05 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Shop" new label page' do
|
|
|
|
project = Project.find_by(name: 'Shop')
|
2017-06-29 13:06:35 -04:00
|
|
|
visit new_project_label_path(project)
|
2014-08-13 08:12:05 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Forum" new label page' do
|
|
|
|
project = Project.find_by(name: 'Forum')
|
2017-06-29 13:06:35 -04:00
|
|
|
visit new_project_label_path(project)
|
2014-07-31 07:06:14 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit merge request page "Bug NS-04"' do
|
2015-09-25 12:09:08 -04:00
|
|
|
visit merge_request_path("Bug NS-04")
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit merge request page "Bug NS-05"' do
|
2015-09-25 12:09:08 -04:00
|
|
|
visit merge_request_path("Bug NS-05")
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2012-10-29 17:23:49 -04:00
|
|
|
end
|
|
|
|
|
2016-02-04 13:23:58 -05:00
|
|
|
step 'I visit merge request page "Bug NS-07"' do
|
|
|
|
visit merge_request_path("Bug NS-07")
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2016-02-04 13:23:58 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit merge request page "Bug NS-08"' do
|
|
|
|
visit merge_request_path("Bug NS-08")
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2016-02-04 13:23:58 -05:00
|
|
|
end
|
|
|
|
|
2015-06-23 08:30:21 -04:00
|
|
|
step 'I visit merge request page "Bug CO-01"' do
|
|
|
|
mr = MergeRequest.find_by(title: "Bug CO-01")
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_request_path(mr.target_project, mr)
|
2017-05-17 14:25:13 -04:00
|
|
|
wait_for_requests
|
2015-06-23 08:30:21 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project "Shop" merge requests page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_requests_path(project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-04-25 10:15:33 -04:00
|
|
|
step 'I visit forked project "Shop" merge requests page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_merge_requests_path(project)
|
2013-04-25 10:15:33 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project "Shop" milestones page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_milestones_path(project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project "Shop" team page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_project_members_path(project)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project wiki page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_wiki_path(@project, :home)
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
2013-01-04 01:43:25 -05:00
|
|
|
|
2014-06-26 03:49:14 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# Visibility Projects
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
step 'I visit project "Community" page' do
|
|
|
|
project = Project.find_by(name: "Community")
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_path(project)
|
2014-06-26 03:49:14 -04:00
|
|
|
end
|
|
|
|
|
2014-09-28 05:52:14 -04:00
|
|
|
step 'I visit project "Community" source page' do
|
|
|
|
project = Project.find_by(name: 'Community')
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_tree_path(project, root_ref)
|
2014-09-28 05:52:14 -04:00
|
|
|
end
|
|
|
|
|
2014-06-26 03:49:14 -04:00
|
|
|
step 'I visit project "Internal" page' do
|
|
|
|
project = Project.find_by(name: "Internal")
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_path(project)
|
2014-06-26 03:49:14 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Enterprise" page' do
|
|
|
|
project = Project.find_by(name: "Enterprise")
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_path(project)
|
2014-06-26 03:49:14 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Empty Projects
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
step "I visit empty project page" do
|
|
|
|
project = Project.find_by(name: "Empty Public Project")
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_path(project)
|
2014-06-26 03:49:14 -04:00
|
|
|
end
|
|
|
|
|
2016-02-22 12:37:26 -05:00
|
|
|
step "I should not see command line instructions" do
|
|
|
|
expect(page).not_to have_css('.empty_wrapper')
|
|
|
|
end
|
|
|
|
|
Internally public projects
Public projects listed in the public section will be linked to the
actual project's page. Public projects now give any user Guest
permissions to the project, allowing them to download the code, read
and create issues, and view anything else in the project's pages.
Ample access tests have been added to the project_access_spec to
verify correct permissions and behavior on public projects.
- Visitors to the site who are not logged in still cannot view the
project's pages.
- Logged-in users visiting a public project where they are not a team
member can create issues, but not snippets. They can view the projects
code, issues, merge requests, etc, just as if they were a Guest member
of the project.
- Since this is a public project, the user is also granted :download_code
permissions, a permission normally reserved for Reporters, since they
can clone the repo anyways and browse commits and branches locally.
2013-05-02 02:52:05 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# Public Projects
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit the public projects area' do
|
2014-07-23 05:18:51 -04:00
|
|
|
visit explore_projects_path
|
Internally public projects
Public projects listed in the public section will be linked to the
actual project's page. Public projects now give any user Guest
permissions to the project, allowing them to download the code, read
and create issues, and view anything else in the project's pages.
Ample access tests have been added to the project_access_spec to
verify correct permissions and behavior on public projects.
- Visitors to the site who are not logged in still cannot view the
project's pages.
- Logged-in users visiting a public project where they are not a team
member can create issues, but not snippets. They can view the projects
code, issues, merge requests, etc, just as if they were a Guest member
of the project.
- Since this is a public project, the user is also granted :download_code
permissions, a permission normally reserved for Reporters, since they
can clone the repo anyways and browse commits and branches locally.
2013-05-02 02:52:05 -04:00
|
|
|
end
|
|
|
|
|
2015-06-22 08:21:34 -04:00
|
|
|
step 'I visit the explore trending projects' do
|
|
|
|
visit trending_explore_projects_path
|
|
|
|
end
|
2014-07-26 03:33:42 -04:00
|
|
|
|
2015-06-22 08:21:34 -04:00
|
|
|
step 'I visit the explore starred projects' do
|
|
|
|
visit starred_explore_projects_path
|
|
|
|
end
|
2014-07-11 12:29:51 -04:00
|
|
|
|
|
|
|
step 'I visit the public groups area' do
|
2014-07-23 05:18:51 -04:00
|
|
|
visit explore_groups_path
|
2014-07-11 12:29:51 -04:00
|
|
|
end
|
|
|
|
|
2013-06-04 11:36:22 -04:00
|
|
|
# ----------------------------------------
|
|
|
|
# Snippets
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I visit project "Shop" snippets page' do
|
2017-06-29 13:06:35 -04:00
|
|
|
visit project_snippets_path(project)
|
2013-03-24 14:31:14 -04:00
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I visit snippets page' do
|
2015-09-09 04:29:42 -04:00
|
|
|
visit explore_snippets_path
|
2013-03-24 18:17:38 -04:00
|
|
|
end
|
|
|
|
|
2013-01-04 01:43:25 -05:00
|
|
|
def root_ref
|
|
|
|
@project.repository.root_ref
|
|
|
|
end
|
2013-02-25 03:28:59 -05:00
|
|
|
|
|
|
|
def project
|
2014-10-03 06:19:31 -04:00
|
|
|
Project.find_by!(name: 'Shop')
|
2013-02-25 03:28:59 -05:00
|
|
|
end
|
2014-02-07 11:59:55 -05:00
|
|
|
|
2015-09-25 12:09:08 -04:00
|
|
|
def merge_request_path(title)
|
|
|
|
mr = MergeRequest.find_by(title: title)
|
2017-06-29 13:06:35 -04:00
|
|
|
project_merge_request_path(mr.target_project, mr)
|
2015-09-25 12:09:08 -04:00
|
|
|
end
|
|
|
|
|
2014-02-07 11:59:55 -05:00
|
|
|
# ----------------------------------------
|
|
|
|
# Errors
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'page status code should be 404' do
|
2015-06-12 00:44:13 -04:00
|
|
|
expect(status_code).to eq 404
|
2014-02-07 11:59:55 -05:00
|
|
|
end
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|