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
22d0569d
Commit
22d0569d
authored
Nov 07, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dashboard steps: 1.9 syntax & use of create instead of Factory
parent
8114d36c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
34 deletions
+33
-34
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+20
-20
features/steps/dashboard/dashboard_issues.rb
features/steps/dashboard/dashboard_issues.rb
+2
-2
features/steps/dashboard/dashboard_merge_requests.rb
features/steps/dashboard/dashboard_merge_requests.rb
+4
-4
features/steps/dashboard/dashboard_search.rb
features/steps/dashboard/dashboard_search.rb
+7
-8
No files found.
features/steps/dashboard/dashboard.rb
View file @
22d0569d
...
@@ -32,7 +32,7 @@ class Dashboard < Spinach::FeatureSteps
...
@@ -32,7 +32,7 @@ class Dashboard < Spinach::FeatureSteps
end
end
Given
'user with name "John Doe" joined project "Shop"'
do
Given
'user with name "John Doe" joined project "Shop"'
do
user
=
Factory
.
create
(
:user
,
{
name:
"John Doe"
})
user
=
create
:user
,
{
name:
"John Doe"
}
project
=
Project
.
find_by_name
"Shop"
project
=
Project
.
find_by_name
"Shop"
Event
.
create
(
Event
.
create
(
project:
project
,
project:
project
,
...
@@ -60,14 +60,14 @@ class Dashboard < Spinach::FeatureSteps
...
@@ -60,14 +60,14 @@ class Dashboard < Spinach::FeatureSteps
end
end
And
'I own project "Shop"'
do
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
'Shop'
@project
=
create
:project
,
name:
'Shop'
@project
.
add_access
(
@user
,
:admin
)
@project
.
add_access
(
@user
,
:admin
)
end
end
And
'I have group with projects'
do
And
'I have group with projects'
do
@group
=
Factory
:group
@group
=
create
:group
@project
=
Factory
:project
,
group:
@group
@project
=
create
:project
,
group:
@group
@event
=
Factory
:closed_issue_event
,
project:
@project
@event
=
create
:closed_issue_event
,
project:
@project
@project
.
add_access
current_user
,
:admin
@project
.
add_access
current_user
,
:admin
end
end
...
@@ -76,25 +76,25 @@ class Dashboard < Spinach::FeatureSteps
...
@@ -76,25 +76,25 @@ class Dashboard < Spinach::FeatureSteps
@project
=
Project
.
find_by_name
(
"Shop"
)
@project
=
Project
.
find_by_name
(
"Shop"
)
data
=
{
data
=
{
:before
=>
"0000000000000000000000000000000000000000"
,
before:
"0000000000000000000000000000000000000000"
,
:after
=>
"0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e"
,
after:
"0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e"
,
:ref
=>
"refs/heads/new_design"
,
ref:
"refs/heads/new_design"
,
:user_id
=>
@user
.
id
,
user_id:
@user
.
id
,
:user_name
=>
@user
.
name
,
user_name:
@user
.
name
,
:repository
=>
{
repository:
{
:name
=>
@project
.
name
,
name:
@project
.
name
,
:url
=>
"localhost/rubinius"
,
url:
"localhost/rubinius"
,
:description
=>
""
,
description:
""
,
:homepage
=>
"localhost/rubinius"
,
homepage:
"localhost/rubinius"
,
:private
=>
true
private:
true
}
}
}
}
@event
=
Event
.
create
(
@event
=
Event
.
create
(
:project
=>
@project
,
project:
@project
,
:action
=>
Event
::
Pushed
,
action:
Event
::
Pushed
,
:data
=>
data
,
data:
data
,
:author_id
=>
@user
.
id
author_id:
@user
.
id
)
)
end
end
...
...
features/steps/dashboard/dashboard_issues.rb
View file @
22d0569d
...
@@ -11,9 +11,9 @@ class DashboardIssues < Spinach::FeatureSteps
...
@@ -11,9 +11,9 @@ class DashboardIssues < Spinach::FeatureSteps
end
end
And
'I have assigned issues'
do
And
'I have assigned issues'
do
project
=
Factory
:project
project
=
create
:project
project
.
add_access
(
@user
,
:read
,
:write
)
project
.
add_access
(
@user
,
:read
,
:write
)
2
.
times
{
Factory
:issue
,
:author
=>
@user
,
:assignee
=>
@user
,
:project
=>
project
}
2
.
times
{
create
:issue
,
author:
@user
,
assignee:
@user
,
project:
project
}
end
end
end
end
features/steps/dashboard/dashboard_merge_requests.rb
View file @
22d0569d
...
@@ -11,13 +11,13 @@ class DashboardMergeRequests < Spinach::FeatureSteps
...
@@ -11,13 +11,13 @@ class DashboardMergeRequests < Spinach::FeatureSteps
end
end
And
'I have authored merge requests'
do
And
'I have authored merge requests'
do
project1
=
Factory
:project
project1
=
create
:project
project2
=
Factory
:project
project2
=
create
:project
project1
.
add_access
(
@user
,
:read
,
:write
)
project1
.
add_access
(
@user
,
:read
,
:write
)
project2
.
add_access
(
@user
,
:read
,
:write
)
project2
.
add_access
(
@user
,
:read
,
:write
)
merge_request1
=
Factory
:merge_request
,
:author
=>
@user
,
:project
=>
project1
merge_request1
=
create
:merge_request
,
author:
@user
,
project:
project1
merge_request2
=
Factory
:merge_request
,
:author
=>
@user
,
:project
=>
project2
merge_request2
=
create
:merge_request
,
author:
@user
,
project:
project2
end
end
end
end
features/steps/dashboard/dashboard_search.rb
View file @
22d0569d
...
@@ -3,7 +3,7 @@ class DashboardSearch < Spinach::FeatureSteps
...
@@ -3,7 +3,7 @@ class DashboardSearch < Spinach::FeatureSteps
include
SharedPaths
include
SharedPaths
Given
'I search for "Sho"'
do
Given
'I search for "Sho"'
do
fill_in
"dashboard_search"
,
:with
=>
"Sho"
fill_in
"dashboard_search"
,
with:
"Sho"
click_button
"Search"
click_button
"Search"
end
end
...
@@ -12,24 +12,23 @@ class DashboardSearch < Spinach::FeatureSteps
...
@@ -12,24 +12,23 @@ class DashboardSearch < Spinach::FeatureSteps
end
end
And
'I own project "Shop"'
do
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
"Shop"
@project
=
create
:project
,
name:
"Shop"
@project
.
add_access
(
@user
,
:admin
)
@project
.
add_access
(
@user
,
:admin
)
end
end
Given
'I search for "Contibuting"'
do
Given
'I search for "Contibuting"'
do
fill_in
"dashboard_search"
,
:with
=>
"Contibuting"
fill_in
"dashboard_search"
,
with:
"Contibuting"
click_button
"Search"
click_button
"Search"
end
end
And
'Project "Shop" has wiki page "Contibuting guide"'
do
And
'Project "Shop" has wiki page "Contibuting guide"'
do
@wiki_page
=
Factory
:wiki
,
:project
=>
@project
,
@wiki_page
=
create
:wiki
,
:title
=>
"Contibuting guide"
,
project:
@project
,
:slug
=>
"contributing"
title:
"Contibuting guide"
,
slug:
"contributing"
end
end
Then
'I should see "Contibuting guide" wiki link'
do
Then
'I should see "Contibuting guide" wiki link'
do
page
.
should
have_link
"Contibuting guide"
page
.
should
have_link
"Contibuting guide"
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