Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
822bf2f9
Commit
822bf2f9
authored
Jan 16, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the `:repository` trait to `:project` factories in Cucumber steps
parent
a8b4ab9d
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
33 additions
and
33 deletions
+33
-33
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+3
-3
features/steps/dashboard/issues.rb
features/steps/dashboard/issues.rb
+2
-2
features/steps/dashboard/merge_requests.rb
features/steps/dashboard/merge_requests.rb
+2
-2
features/steps/group/milestones.rb
features/steps/group/milestones.rb
+1
-1
features/steps/groups.rb
features/steps/groups.rb
+1
-1
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+1
-1
features/steps/project/deploy_keys.rb
features/steps/project/deploy_keys.rb
+2
-2
features/steps/project/fork.rb
features/steps/project/fork.rb
+2
-2
features/steps/project/forked_merge_requests.rb
features/steps/project/forked_merge_requests.rb
+1
-1
features/steps/project/merge_requests/acceptance.rb
features/steps/project/merge_requests/acceptance.rb
+1
-1
features/steps/project/merge_requests/revert.rb
features/steps/project/merge_requests/revert.rb
+1
-1
features/steps/project/redirects.rb
features/steps/project/redirects.rb
+2
-2
features/steps/project/source/browse_files.rb
features/steps/project/source/browse_files.rb
+1
-1
features/steps/project/source/markdown_render.rb
features/steps/project/source/markdown_render.rb
+1
-1
features/steps/project/team_management.rb
features/steps/project/team_management.rb
+1
-1
features/steps/shared/admin.rb
features/steps/shared/admin.rb
+1
-1
features/steps/shared/group.rb
features/steps/shared/group.rb
+1
-1
features/steps/shared/project.rb
features/steps/shared/project.rb
+8
-8
features/steps/user.rb
features/steps/user.rb
+1
-1
No files found.
features/steps/dashboard/dashboard.rb
View file @
822bf2f9
...
@@ -35,7 +35,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
...
@@ -35,7 +35,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
step
'I have group with projects'
do
step
'I have group with projects'
do
@group
=
create
(
:group
)
@group
=
create
(
:group
)
@project
=
create
(
:project
,
namespace:
@group
)
@project
=
create
(
:project
,
:repository
,
namespace:
@group
)
@event
=
create
(
:closed_issue_event
,
project:
@project
)
@event
=
create
(
:closed_issue_event
,
project:
@project
)
@project
.
team
<<
[
current_user
,
:master
]
@project
.
team
<<
[
current_user
,
:master
]
...
@@ -54,8 +54,8 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
...
@@ -54,8 +54,8 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
end
step
'group has a projects that does not belongs to me'
do
step
'group has a projects that does not belongs to me'
do
@forbidden_project1
=
create
(
:project
,
group:
@group
)
@forbidden_project1
=
create
(
:project
,
:repository
,
group:
@group
)
@forbidden_project2
=
create
(
:project
,
group:
@group
)
@forbidden_project2
=
create
(
:project
,
:repository
,
group:
@group
)
end
end
step
'I should see 1 project at group list'
do
step
'I should see 1 project at group list'
do
...
...
features/steps/dashboard/issues.rb
View file @
822bf2f9
...
@@ -79,13 +79,13 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
...
@@ -79,13 +79,13 @@ class Spinach::Features::DashboardIssues < Spinach::FeatureSteps
def
project
def
project
@project
||=
begin
@project
||=
begin
project
=
create
:project
project
=
create
(
:project
,
:repository
)
project
.
team
<<
[
current_user
,
:master
]
project
.
team
<<
[
current_user
,
:master
]
project
project
end
end
end
end
def
public_project
def
public_project
@public_project
||=
create
:project
,
:public
@public_project
||=
create
(
:project
,
:public
,
:repository
)
end
end
end
end
features/steps/dashboard/merge_requests.rb
View file @
822bf2f9
...
@@ -105,14 +105,14 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
...
@@ -105,14 +105,14 @@ class Spinach::Features::DashboardMergeRequests < Spinach::FeatureSteps
def
project
def
project
@project
||=
begin
@project
||=
begin
project
=
create
:project
project
=
create
(
:project
,
:repository
)
project
.
team
<<
[
current_user
,
:master
]
project
.
team
<<
[
current_user
,
:master
]
project
project
end
end
end
end
def
public_project
def
public_project
@public_project
||=
create
:project
,
:public
@public_project
||=
create
(
:project
,
:public
,
:repository
)
end
end
def
forked_project
def
forked_project
...
...
features/steps/group/milestones.rb
View file @
822bf2f9
...
@@ -104,7 +104,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
...
@@ -104,7 +104,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
group
=
owned_group
group
=
owned_group
%w(gitlabhq gitlab-ci cookbook-gitlab)
.
each
do
|
path
|
%w(gitlabhq gitlab-ci cookbook-gitlab)
.
each
do
|
path
|
project
=
create
:project
,
path:
path
,
group:
group
project
=
create
(
:project
,
:repository
,
path:
path
,
group:
group
)
milestone
=
create
:milestone
,
title:
"Version 7.2"
,
project:
project
milestone
=
create
:milestone
,
title:
"Version 7.2"
,
project:
project
create
(
:label
,
project:
project
,
title:
'bug'
)
create
(
:label
,
project:
project
,
title:
'bug'
)
...
...
features/steps/groups.rb
View file @
822bf2f9
...
@@ -109,7 +109,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
...
@@ -109,7 +109,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
step
'Group "Owned" has archived project'
do
step
'Group "Owned" has archived project'
do
group
=
Group
.
find_by
(
name:
'Owned'
)
group
=
Group
.
find_by
(
name:
'Owned'
)
@archived_project
=
create
(
:project
,
namespace:
group
,
archived:
true
,
path:
"archived-project"
)
@archived_project
=
create
(
:project
,
:repository
,
namespace:
group
,
archived:
true
,
path:
"archived-project"
)
end
end
step
'I should see "archived" label'
do
step
'I should see "archived" label'
do
...
...
features/steps/profile/profile.rb
View file @
822bf2f9
...
@@ -162,7 +162,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
...
@@ -162,7 +162,7 @@ class Spinach::Features::Profile < Spinach::FeatureSteps
step
'I have group with projects'
do
step
'I have group with projects'
do
@group
=
create
(
:group
)
@group
=
create
(
:group
)
@group
.
add_owner
(
current_user
)
@group
.
add_owner
(
current_user
)
@project
=
create
(
:project
,
namespace:
@group
)
@project
=
create
(
:project
,
:repository
,
namespace:
@group
)
@event
=
create
(
:closed_issue_event
,
project:
@project
)
@event
=
create
(
:closed_issue_event
,
project:
@project
)
@project
.
team
<<
[
current_user
,
:master
]
@project
.
team
<<
[
current_user
,
:master
]
...
...
features/steps/project/deploy_keys.rb
View file @
822bf2f9
...
@@ -46,11 +46,11 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
...
@@ -46,11 +46,11 @@ class Spinach::Features::ProjectDeployKeys < Spinach::FeatureSteps
end
end
step
'other projects have deploy keys'
do
step
'other projects have deploy keys'
do
@second_project
=
create
(
:project
,
namespace:
create
(
:group
))
@second_project
=
create
(
:project
,
:repository
,
namespace:
create
(
:group
))
@second_project
.
team
<<
[
current_user
,
:master
]
@second_project
.
team
<<
[
current_user
,
:master
]
create
(
:deploy_keys_project
,
project:
@second_project
)
create
(
:deploy_keys_project
,
project:
@second_project
)
@third_project
=
create
(
:project
,
namespace:
create
(
:group
))
@third_project
=
create
(
:project
,
:repository
,
namespace:
create
(
:group
))
@third_project
.
team
<<
[
current_user
,
:master
]
@third_project
.
team
<<
[
current_user
,
:master
]
create
(
:deploy_keys_project
,
project:
@third_project
,
deploy_key:
@second_project
.
deploy_keys
.
first
)
create
(
:deploy_keys_project
,
project:
@third_project
,
deploy_key:
@second_project
.
deploy_keys
.
first
)
end
end
...
...
features/steps/project/fork.rb
View file @
822bf2f9
...
@@ -9,7 +9,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
...
@@ -9,7 +9,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
end
end
step
'I am a member of project "Shop"'
do
step
'I am a member of project "Shop"'
do
@project
=
create
(
:project
,
name:
"Shop"
)
@project
=
create
(
:project
,
:repository
,
name:
"Shop"
)
@project
.
team
<<
[
@user
,
:reporter
]
@project
.
team
<<
[
@user
,
:reporter
]
end
end
...
@@ -18,7 +18,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
...
@@ -18,7 +18,7 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
end
end
step
'I already have a project named "Shop" in my namespace'
do
step
'I already have a project named "Shop" in my namespace'
do
@my_project
=
create
(
:project
,
name:
"Shop"
,
namespace:
current_user
.
namespace
)
@my_project
=
create
(
:project
,
:repository
,
name:
"Shop"
,
namespace:
current_user
.
namespace
)
end
end
step
'I should see a "Name has already been taken" warning'
do
step
'I should see a "Name has already been taken" warning'
do
...
...
features/steps/project/forked_merge_requests.rb
View file @
822bf2f9
...
@@ -7,7 +7,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
...
@@ -7,7 +7,7 @@ class Spinach::Features::ProjectForkedMergeRequests < Spinach::FeatureSteps
step
'I am a member of project "Shop"'
do
step
'I am a member of project "Shop"'
do
@project
=
Project
.
find_by
(
name:
"Shop"
)
@project
=
Project
.
find_by
(
name:
"Shop"
)
@project
||=
create
(
:project
,
name:
"Shop"
)
@project
||=
create
(
:project
,
:repository
,
name:
"Shop"
)
@project
.
team
<<
[
@user
,
:reporter
]
@project
.
team
<<
[
@user
,
:reporter
]
end
end
...
...
features/steps/project/merge_requests/acceptance.rb
View file @
822bf2f9
...
@@ -28,7 +28,7 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
...
@@ -28,7 +28,7 @@ class Spinach::Features::ProjectMergeRequestsAcceptance < Spinach::FeatureSteps
step
'There is an open Merge Request'
do
step
'There is an open Merge Request'
do
@user
=
create
(
:user
)
@user
=
create
(
:user
)
@project
=
create
(
:project
,
:public
)
@project
=
create
(
:project
,
:public
,
:repository
)
@project_member
=
create
(
:project_member
,
:developer
,
user:
@user
,
project:
@project
)
@project_member
=
create
(
:project_member
,
:developer
,
user:
@user
,
project:
@project
)
@merge_request
=
create
(
:merge_request
,
:with_diffs
,
:simple
,
source_project:
@project
)
@merge_request
=
create
(
:merge_request
,
:with_diffs
,
:simple
,
source_project:
@project
)
end
end
...
...
features/steps/project/merge_requests/revert.rb
View file @
822bf2f9
...
@@ -35,7 +35,7 @@ class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps
...
@@ -35,7 +35,7 @@ class Spinach::Features::RevertMergeRequests < Spinach::FeatureSteps
step
'There is an open Merge Request'
do
step
'There is an open Merge Request'
do
@user
=
create
(
:user
)
@user
=
create
(
:user
)
@project
=
create
(
:project
,
:public
)
@project
=
create
(
:project
,
:public
,
:repository
)
@project_member
=
create
(
:project_member
,
:developer
,
user:
@user
,
project:
@project
)
@project_member
=
create
(
:project_member
,
:developer
,
user:
@user
,
project:
@project
)
@merge_request
=
create
(
:merge_request
,
:with_diffs
,
:simple
,
source_project:
@project
)
@merge_request
=
create
(
:merge_request
,
:with_diffs
,
:simple
,
source_project:
@project
)
end
end
...
...
features/steps/project/redirects.rb
View file @
822bf2f9
...
@@ -4,11 +4,11 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
...
@@ -4,11 +4,11 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
include
SharedProject
include
SharedProject
step
'public project "Community"'
do
step
'public project "Community"'
do
create
:project
,
:public
,
name:
'Community'
create
(
:project
,
:public
,
:repository
,
name:
'Community'
)
end
end
step
'private project "Enterprise"'
do
step
'private project "Enterprise"'
do
create
:project
,
name:
'Enterprise'
create
(
:project
,
:repository
,
name:
'Enterprise'
)
end
end
step
'I visit project "Community" page'
do
step
'I visit project "Community" page'
do
...
...
features/steps/project/source/browse_files.rb
View file @
822bf2f9
...
@@ -6,7 +6,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -6,7 +6,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
include
RepoHelpers
include
RepoHelpers
step
"I don't have write access"
do
step
"I don't have write access"
do
@project
=
create
(
:project
,
name:
"Other Project"
,
path:
"other-project"
)
@project
=
create
(
:project
,
:repository
,
name:
"Other Project"
,
path:
"other-project"
)
@project
.
team
<<
[
@user
,
:reporter
]
@project
.
team
<<
[
@user
,
:reporter
]
visit
namespace_project_tree_path
(
@project
.
namespace
,
@project
,
root_ref
)
visit
namespace_project_tree_path
(
@project
.
namespace
,
@project
,
root_ref
)
end
end
...
...
features/steps/project/source/markdown_render.rb
View file @
822bf2f9
...
@@ -8,7 +8,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
...
@@ -8,7 +8,7 @@ class Spinach::Features::ProjectSourceMarkdownRender < Spinach::FeatureSteps
step
'I own project "Delta"'
do
step
'I own project "Delta"'
do
@project
=
Project
.
find_by
(
name:
"Delta"
)
@project
=
Project
.
find_by
(
name:
"Delta"
)
@project
||=
create
(
:project
,
name:
"Delta"
,
namespace:
@user
.
namespace
)
@project
||=
create
(
:project
,
:repository
,
name:
"Delta"
,
namespace:
@user
.
namespace
)
@project
.
team
<<
[
@user
,
:master
]
@project
.
team
<<
[
@user
,
:master
]
end
end
...
...
features/steps/project/team_management.rb
View file @
822bf2f9
...
@@ -137,7 +137,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
...
@@ -137,7 +137,7 @@ class Spinach::Features::ProjectTeamManagement < Spinach::FeatureSteps
step
'I share project with group "OpenSource"'
do
step
'I share project with group "OpenSource"'
do
project
=
Project
.
find_by
(
name:
'Shop'
)
project
=
Project
.
find_by
(
name:
'Shop'
)
os_group
=
create
(
:group
,
name:
'OpenSource'
)
os_group
=
create
(
:group
,
name:
'OpenSource'
)
create
(
:project
,
group:
os_group
)
create
(
:project
,
:repository
,
group:
os_group
)
@os_user1
=
create
(
:user
)
@os_user1
=
create
(
:user
)
@os_user2
=
create
(
:user
)
@os_user2
=
create
(
:user
)
os_group
.
add_owner
(
@os_user1
)
os_group
.
add_owner
(
@os_user1
)
...
...
features/steps/shared/admin.rb
View file @
822bf2f9
...
@@ -2,7 +2,7 @@ module SharedAdmin
...
@@ -2,7 +2,7 @@ module SharedAdmin
include
Spinach
::
DSL
include
Spinach
::
DSL
step
'there are projects in system'
do
step
'there are projects in system'
do
2
.
times
{
create
(
:project
)
}
2
.
times
{
create
(
:project
,
:repository
)
}
end
end
step
'system has users'
do
step
'system has users'
do
...
...
features/steps/shared/group.rb
View file @
822bf2f9
...
@@ -40,7 +40,7 @@ module SharedGroup
...
@@ -40,7 +40,7 @@ module SharedGroup
user
=
User
.
find_by
(
name:
username
)
||
create
(
:user
,
name:
username
)
user
=
User
.
find_by
(
name:
username
)
||
create
(
:user
,
name:
username
)
group
=
Group
.
find_by
(
name:
groupname
)
||
create
(
:group
,
name:
groupname
)
group
=
Group
.
find_by
(
name:
groupname
)
||
create
(
:group
,
name:
groupname
)
group
.
add_user
(
user
,
role
)
group
.
add_user
(
user
,
role
)
project
||=
create
(
:project
,
namespace:
group
,
path:
"project
#{
@project_count
}
"
)
project
||=
create
(
:project
,
:repository
,
namespace:
group
,
path:
"project
#{
@project_count
}
"
)
create
(
:closed_issue_event
,
project:
project
)
create
(
:closed_issue_event
,
project:
project
)
project
.
team
<<
[
user
,
:master
]
project
.
team
<<
[
user
,
:master
]
@project_count
+=
1
@project_count
+=
1
...
...
features/steps/shared/project.rb
View file @
822bf2f9
...
@@ -3,19 +3,19 @@ module SharedProject
...
@@ -3,19 +3,19 @@ module SharedProject
# Create a project without caring about what it's called
# Create a project without caring about what it's called
step
"I own a project"
do
step
"I own a project"
do
@project
=
create
(
:project
,
namespace:
@user
.
namespace
)
@project
=
create
(
:project
,
:repository
,
namespace:
@user
.
namespace
)
@project
.
team
<<
[
@user
,
:master
]
@project
.
team
<<
[
@user
,
:master
]
end
end
step
"project exists in some group namespace"
do
step
"project exists in some group namespace"
do
@group
=
create
(
:group
,
name:
'some group'
)
@group
=
create
(
:group
,
name:
'some group'
)
@project
=
create
(
:project
,
namespace:
@group
,
public_builds:
false
)
@project
=
create
(
:project
,
:repository
,
namespace:
@group
,
public_builds:
false
)
end
end
# Create a specific project called "Shop"
# Create a specific project called "Shop"
step
'I own project "Shop"'
do
step
'I own project "Shop"'
do
@project
=
Project
.
find_by
(
name:
"Shop"
)
@project
=
Project
.
find_by
(
name:
"Shop"
)
@project
||=
create
(
:project
,
name:
"Shop"
,
namespace:
@user
.
namespace
)
@project
||=
create
(
:project
,
:repository
,
name:
"Shop"
,
namespace:
@user
.
namespace
)
@project
.
team
<<
[
@user
,
:master
]
@project
.
team
<<
[
@user
,
:master
]
end
end
...
@@ -40,7 +40,7 @@ module SharedProject
...
@@ -40,7 +40,7 @@ module SharedProject
# Create another specific project called "Forum"
# Create another specific project called "Forum"
step
'I own project "Forum"'
do
step
'I own project "Forum"'
do
@project
=
Project
.
find_by
(
name:
"Forum"
)
@project
=
Project
.
find_by
(
name:
"Forum"
)
@project
||=
create
(
:project
,
name:
"Forum"
,
namespace:
@user
.
namespace
,
path:
'forum_project'
)
@project
||=
create
(
:project
,
:repository
,
name:
"Forum"
,
namespace:
@user
.
namespace
,
path:
'forum_project'
)
@project
.
build_project_feature
@project
.
build_project_feature
@project
.
project_feature
.
save
@project
.
project_feature
.
save
@project
.
team
<<
[
@user
,
:master
]
@project
.
team
<<
[
@user
,
:master
]
...
@@ -121,7 +121,7 @@ module SharedProject
...
@@ -121,7 +121,7 @@ module SharedProject
# ----------------------------------------
# ----------------------------------------
step
'archived project "Archive"'
do
step
'archived project "Archive"'
do
create
:project
,
:public
,
archived:
true
,
name:
'Archive'
create
(
:project
,
:archived
,
:public
,
:repository
,
name:
'Archive'
)
end
end
step
'I should not see project "Archive"'
do
step
'I should not see project "Archive"'
do
...
@@ -144,7 +144,7 @@ module SharedProject
...
@@ -144,7 +144,7 @@ module SharedProject
# ----------------------------------------
# ----------------------------------------
step
'private project "Enterprise"'
do
step
'private project "Enterprise"'
do
create
:project
,
name:
'Enterprise'
create
(
:project
,
:private
,
:repository
,
name:
'Enterprise'
)
end
end
step
'I should see project "Enterprise"'
do
step
'I should see project "Enterprise"'
do
...
@@ -156,7 +156,7 @@ module SharedProject
...
@@ -156,7 +156,7 @@ module SharedProject
end
end
step
'internal project "Internal"'
do
step
'internal project "Internal"'
do
create
:project
,
:internal
,
name:
'Internal'
create
(
:project
,
:internal
,
:repository
,
name:
'Internal'
)
end
end
step
'I should see project "Internal"'
do
step
'I should see project "Internal"'
do
...
@@ -168,7 +168,7 @@ module SharedProject
...
@@ -168,7 +168,7 @@ module SharedProject
end
end
step
'public project "Community"'
do
step
'public project "Community"'
do
create
:project
,
:public
,
name:
'Community'
create
(
:project
,
:public
,
:repository
,
name:
'Community'
)
end
end
step
'I should see project "Community"'
do
step
'I should see project "Community"'
do
...
...
features/steps/user.rb
View file @
822bf2f9
...
@@ -38,6 +38,6 @@ class Spinach::Features::User < Spinach::FeatureSteps
...
@@ -38,6 +38,6 @@ class Spinach::Features::User < Spinach::FeatureSteps
end
end
def
contributed_project
def
contributed_project
@contributed_project
||=
create
(
:project
,
:public
)
@contributed_project
||=
create
(
:project
,
:public
,
:repository
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment