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
|
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
|
|
|
|
|
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
|
|
|
|
visit 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" issues page' do
|
|
|
|
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
|
|
|
|
visit merge_requests_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" members page' do
|
|
|
|
visit members_group_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
|
|
|
|
visit edit_group_path(Group.find_by(name:"Owned"))
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" page' do
|
|
|
|
visit group_path(Group.find_by(name:"Guest"))
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" issues page' do
|
|
|
|
visit issues_group_path(Group.find_by(name:"Guest"))
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" merge requests page' do
|
|
|
|
visit merge_requests_group_path(Group.find_by(name:"Guest"))
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" members page' do
|
|
|
|
visit members_group_path(Group.find_by(name:"Guest"))
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit group "Guest" settings page' do
|
|
|
|
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
|
2012-09-25 20:11:57 -04:00
|
|
|
visit 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
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit dashboard help page' do
|
2012-09-25 20:11:57 -04:00
|
|
|
visit help_path
|
2012-09-10 11:35:03 -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
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit profile design page' do
|
2012-12-02 06:29:24 -05:00
|
|
|
visit design_profile_path
|
2012-09-25 20:11:57 -04:00
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit profile history page' do
|
2012-12-02 06:29:24 -05:00
|
|
|
visit history_profile_path
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|
|
|
|
|
2014-02-07 11:59:55 -05:00
|
|
|
step 'I visit profile groups page' do
|
|
|
|
visit profile_groups_path
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I should be redirected to the profile groups page' do
|
|
|
|
current_path.should == profile_groups_path
|
|
|
|
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
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit admin projects page' do
|
2012-09-25 20:11:57 -04:00
|
|
|
visit admin_projects_path
|
|
|
|
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 groups page' do
|
2012-10-22 14:42:06 -04:00
|
|
|
visit admin_groups_path
|
|
|
|
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
|
|
|
|
|
2015-01-08 12:53:35 -05:00
|
|
|
step 'I visit admin settings page' do
|
|
|
|
visit admin_application_settings_path
|
|
|
|
end
|
|
|
|
|
2015-01-19 14:18:00 -05:00
|
|
|
step 'I visit applications page' do
|
|
|
|
visit admin_applications_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
|
2012-09-25 22:34:29 -04:00
|
|
|
visit project_path(@project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's settings page" do
|
2013-03-14 15:51:44 -04:00
|
|
|
visit edit_project_path(@project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's files page" do
|
2013-01-04 01:43:25 -05: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
|
|
|
|
visit project_blob_path(@project, File.join(
|
|
|
|
root_ref, 'files/images/logo-black.png'))
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's commits page" do
|
2013-01-04 01:43:25 -05: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
|
2013-01-04 01:43:25 -05: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
|
2012-11-10 16:33:10 -05:00
|
|
|
visit stats_project_repository_path(@project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's network 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
|
|
|
|
2013-06-11 02:54:01 -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
|
2012-09-25 22:34:29 -04:00
|
|
|
visit project_issues_path(@project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's merge requests page" do
|
2012-09-25 22:34:29 -04:00
|
|
|
visit project_merge_requests_path(@project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step "I visit my project's wiki page" do
|
2013-03-10 17:37:26 -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
|
2012-09-27 16:52:08 -04:00
|
|
|
visit project_hooks_path(@project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project deploy keys page' do
|
|
|
|
visit project_deploy_keys_path(@project)
|
|
|
|
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
|
2012-09-10 11:35:03 -04:00
|
|
|
visit project_path(project)
|
|
|
|
end
|
|
|
|
|
2013-04-25 10:15:33 -04:00
|
|
|
step 'I visit project "Forked Shop" merge requests page' do
|
|
|
|
visit project_merge_requests_path(@forked_project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit edit project "Shop" page' do
|
2013-01-09 00:14:05 -05:00
|
|
|
visit edit_project_path(project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project branches page' do
|
2013-07-16 15:25:59 -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
|
|
|
|
visit project_protected_branches_path(@project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit compare refs page' do
|
2012-09-25 23:13:19 -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
|
2013-01-04 01:43:25 -05: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
|
2012-09-25 20:01:51 -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 project source page' do
|
2013-01-04 01:43:25 -05:00
|
|
|
visit project_tree_path(@project, root_ref)
|
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
|
2014-07-31 10:23:40 -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
|
|
|
|
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
|
2015-01-26 18:12:13 -05:00
|
|
|
current_path.should 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-01-26 18:12:13 -05:00
|
|
|
current_path.should eq(project_edit_blob_path(
|
2014-09-25 10:43:23 -04:00
|
|
|
@project, File.join(root_ref, '.gitignore')))
|
|
|
|
end
|
|
|
|
|
2014-07-31 09:20:47 -04:00
|
|
|
step 'I visit project source page for "6d39438"' do
|
|
|
|
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
|
|
|
|
visit project_tree_path(@project,
|
|
|
|
'6d394385cf567f80a8fd85055db1ab4c5295806f')
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project tags page' do
|
2013-07-16 16:14:22 -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
|
2014-07-31 10:23:40 -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
|
2013-02-25 03:28:59 -05: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")
|
2012-09-10 11:35:03 -04:00
|
|
|
visit project_issue_path(issue.project, issue)
|
|
|
|
end
|
|
|
|
|
2014-10-06 02:59:03 -04:00
|
|
|
step 'I visit issue page "Tasks-open"' do
|
|
|
|
issue = Issue.find_by(title: 'Tasks-open')
|
|
|
|
visit project_issue_path(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)
|
|
|
|
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')
|
2013-02-25 03:28:59 -05: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')
|
|
|
|
visit project_labels_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Shop" new label page' do
|
|
|
|
project = Project.find_by(name: 'Shop')
|
|
|
|
visit new_project_label_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Forum" new label page' do
|
|
|
|
project = Project.find_by(name: 'Forum')
|
2014-07-31 07:06:14 -04:00
|
|
|
visit new_project_label_path(project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit merge request page "Bug NS-04"' do
|
2014-01-19 13:55:59 -05:00
|
|
|
mr = MergeRequest.find_by(title: "Bug NS-04")
|
2013-04-25 10:15:33 -04:00
|
|
|
visit project_merge_request_path(mr.target_project, mr)
|
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
|
2014-01-19 13:55:59 -05:00
|
|
|
mr = MergeRequest.find_by(title: "Bug NS-05")
|
2013-04-25 10:15:33 -04:00
|
|
|
visit project_merge_request_path(mr.target_project, mr)
|
2012-10-29 17:23:49 -04:00
|
|
|
end
|
|
|
|
|
2014-10-06 02:59:03 -04:00
|
|
|
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)
|
|
|
|
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)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project "Shop" merge requests page' do
|
2013-02-25 03:28:59 -05: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
|
|
|
|
visit project_merge_requests_path(project)
|
|
|
|
end
|
|
|
|
|
2013-05-06 08:09:41 -04:00
|
|
|
step 'I visit project "Shop" milestones page' do
|
2013-02-25 03:28:59 -05: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
|
2013-02-25 03:28:59 -05:00
|
|
|
visit project_team_index_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
|
2013-03-10 17:37:26 -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")
|
|
|
|
visit project_path(project)
|
|
|
|
end
|
|
|
|
|
2014-09-28 05:52:14 -04:00
|
|
|
step 'I visit project "Community" source page' do
|
|
|
|
project = Project.find_by(name: 'Community')
|
|
|
|
visit project_tree_path(project, root_ref)
|
|
|
|
end
|
|
|
|
|
2014-06-26 03:49:14 -04:00
|
|
|
step 'I visit project "Internal" page' do
|
|
|
|
project = Project.find_by(name: "Internal")
|
|
|
|
visit project_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
step 'I visit project "Enterprise" page' do
|
|
|
|
project = Project.find_by(name: "Enterprise")
|
|
|
|
visit project_path(project)
|
|
|
|
end
|
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Empty Projects
|
|
|
|
# ----------------------------------------
|
|
|
|
|
|
|
|
step "I visit empty project page" do
|
|
|
|
project = Project.find_by(name: "Empty Public Project")
|
|
|
|
visit project_path(project)
|
|
|
|
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
|
|
|
|
|
2014-07-26 03:33:42 -04:00
|
|
|
step 'I visit the explore trending projects' do
|
|
|
|
visit trending_explore_projects_path
|
|
|
|
end
|
|
|
|
|
|
|
|
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
|
2013-03-24 14:31:14 -04:00
|
|
|
visit project_snippets_path(project)
|
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I visit snippets page' do
|
2013-03-24 18:17:38 -04:00
|
|
|
visit snippets_path
|
|
|
|
end
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'I visit new snippet page' do
|
2013-03-24 18:17:38 -04:00
|
|
|
visit new_snippet_path
|
|
|
|
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
|
|
|
|
|
|
|
# ----------------------------------------
|
|
|
|
# Errors
|
|
|
|
# ----------------------------------------
|
|
|
|
|
2014-09-21 17:40:22 -04:00
|
|
|
step 'page status code should be 404' do
|
2014-09-24 02:28:41 -04:00
|
|
|
status_code.should == 404
|
2014-02-07 11:59:55 -05:00
|
|
|
end
|
2012-09-10 11:35:03 -04:00
|
|
|
end
|