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
Jérome Perrin
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
Show 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
end
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"
Event
.
create
(
project:
project
,
...
...
@@ -60,14 +60,14 @@ class Dashboard < Spinach::FeatureSteps
end
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
'Shop'
@project
=
create
:project
,
name:
'Shop'
@project
.
add_access
(
@user
,
:admin
)
end
And
'I have group with projects'
do
@group
=
Factory
:group
@project
=
Factory
:project
,
group:
@group
@event
=
Factory
:closed_issue_event
,
project:
@project
@group
=
create
:group
@project
=
create
:project
,
group:
@group
@event
=
create
:closed_issue_event
,
project:
@project
@project
.
add_access
current_user
,
:admin
end
...
...
@@ -76,25 +76,25 @@ class Dashboard < Spinach::FeatureSteps
@project
=
Project
.
find_by_name
(
"Shop"
)
data
=
{
:before
=>
"0000000000000000000000000000000000000000"
,
:after
=>
"0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e"
,
:ref
=>
"refs/heads/new_design"
,
:user_id
=>
@user
.
id
,
:user_name
=>
@user
.
name
,
:repository
=>
{
:name
=>
@project
.
name
,
:url
=>
"localhost/rubinius"
,
:description
=>
""
,
:homepage
=>
"localhost/rubinius"
,
:private
=>
true
before:
"0000000000000000000000000000000000000000"
,
after:
"0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e"
,
ref:
"refs/heads/new_design"
,
user_id:
@user
.
id
,
user_name:
@user
.
name
,
repository:
{
name:
@project
.
name
,
url:
"localhost/rubinius"
,
description:
""
,
homepage:
"localhost/rubinius"
,
private:
true
}
}
@event
=
Event
.
create
(
:project
=>
@project
,
:action
=>
Event
::
Pushed
,
:data
=>
data
,
:author_id
=>
@user
.
id
project:
@project
,
action:
Event
::
Pushed
,
data:
data
,
author_id:
@user
.
id
)
end
...
...
features/steps/dashboard/dashboard_issues.rb
View file @
22d0569d
...
...
@@ -11,9 +11,9 @@ class DashboardIssues < Spinach::FeatureSteps
end
And
'I have assigned issues'
do
project
=
Factory
:project
project
=
create
:project
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
features/steps/dashboard/dashboard_merge_requests.rb
View file @
22d0569d
...
...
@@ -11,13 +11,13 @@ class DashboardMergeRequests < Spinach::FeatureSteps
end
And
'I have authored merge requests'
do
project1
=
Factory
:project
project2
=
Factory
:project
project1
=
create
:project
project2
=
create
:project
project1
.
add_access
(
@user
,
:read
,
:write
)
project2
.
add_access
(
@user
,
:read
,
:write
)
merge_request1
=
Factory
:merge_request
,
:author
=>
@user
,
:project
=>
project1
merge_request2
=
Factory
:merge_request
,
:author
=>
@user
,
:project
=>
project2
merge_request1
=
create
:merge_request
,
author:
@user
,
project:
project1
merge_request2
=
create
:merge_request
,
author:
@user
,
project:
project2
end
end
features/steps/dashboard/dashboard_search.rb
View file @
22d0569d
...
...
@@ -3,7 +3,7 @@ class DashboardSearch < Spinach::FeatureSteps
include
SharedPaths
Given
'I search for "Sho"'
do
fill_in
"dashboard_search"
,
:with
=>
"Sho"
fill_in
"dashboard_search"
,
with:
"Sho"
click_button
"Search"
end
...
...
@@ -12,24 +12,23 @@ class DashboardSearch < Spinach::FeatureSteps
end
And
'I own project "Shop"'
do
@project
=
Factory
:project
,
:name
=>
"Shop"
@project
=
create
:project
,
name:
"Shop"
@project
.
add_access
(
@user
,
:admin
)
end
Given
'I search for "Contibuting"'
do
fill_in
"dashboard_search"
,
:with
=>
"Contibuting"
fill_in
"dashboard_search"
,
with:
"Contibuting"
click_button
"Search"
end
And
'Project "Shop" has wiki page "Contibuting guide"'
do
@wiki_page
=
Factory
:wiki
,
:project
=>
@project
,
:title
=>
"Contibuting guide"
,
:slug
=>
"contributing"
@wiki_page
=
create
:wiki
,
project:
@project
,
title:
"Contibuting guide"
,
slug:
"contributing"
end
Then
'I should see "Contibuting guide" wiki link'
do
page
.
should
have_link
"Contibuting guide"
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