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
Boxiang Sun
gitlab-ce
Commits
b1970e0c
Commit
b1970e0c
authored
Dec 24, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests for Dashboard#issues filter
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
4c61c467
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
11 deletions
+75
-11
features/dashboard/issues.feature
features/dashboard/issues.feature
+11
-1
features/steps/dashboard/dashboard_issues.rb
features/steps/dashboard/dashboard_issues.rb
+64
-10
No files found.
features/dashboard/issues.feature
View file @
b1970e0c
Feature
:
Dashboard Issues
Feature
:
Dashboard Issues
Background
:
Background
:
Given
I sign in as a user
Given
I sign in as a user
And
I have authored issues
And
I have assigned issues
And
I have assigned issues
And
I have other issues
And
I visit dashboard issues page
And
I visit dashboard issues page
Scenario
:
I
should see
issues list
Scenario
:
I
should see
assigned issues
Then
I should see issues assigned to me
Then
I should see issues assigned to me
Scenario
:
I
should see authored issues
When
I click
"Authored by me"
link
Then
I should see issues authored by me
Scenario
:
I
should see all issues
When
I click
"All"
link
Then
I should see all issues
features/steps/dashboard/dashboard_issues.rb
View file @
b1970e0c
...
@@ -2,19 +2,73 @@ class DashboardIssues < Spinach::FeatureSteps
...
@@ -2,19 +2,73 @@ class DashboardIssues < Spinach::FeatureSteps
include
SharedAuthentication
include
SharedAuthentication
include
SharedPaths
include
SharedPaths
Then
'I should see issues assigned to me'
do
step
'I should see issues assigned to me'
do
issues
=
@user
.
issues
should_see
(
assigned_issue
)
issues
.
each
do
|
issue
|
should_not_see
(
authored_issue
)
should_not_see
(
other_issue
)
end
step
'I should see issues authored by me'
do
should_see
(
authored_issue
)
should_not_see
(
assigned_issue
)
should_not_see
(
other_issue
)
end
step
'I should see all issues'
do
should_see
(
authored_issue
)
should_see
(
assigned_issue
)
should_see
(
other_issue
)
end
step
'I have authored issues'
do
authored_issue
end
step
'I have assigned issues'
do
assigned_issue
end
step
'I have other issues'
do
other_issue
end
step
'I click "Authored by me" link'
do
within
".scope-filter"
do
click_link
'Authored by me'
end
end
step
'I click "All" link'
do
within
".scope-filter"
do
click_link
'All'
end
end
def
should_see
(
issue
)
page
.
should
have_content
(
issue
.
title
[
0
..
10
])
page
.
should
have_content
(
issue
.
title
[
0
..
10
])
page
.
should
have_content
(
issue
.
project
.
name
)
page
.
should
have_link
(
issue
.
project
.
name
)
end
end
def
should_not_see
(
issue
)
page
.
should_not
have_content
(
issue
.
title
[
0
..
10
])
end
def
assigned_issue
@assigned_issue
||=
create
:issue
,
assignee:
current_user
,
project:
project
end
def
authored_issue
@authored_issue
||=
create
:issue
,
author:
current_user
,
project:
project
end
end
And
'I have assigned issues'
do
def
other_issue
project
=
create
:
project
@other_issue
||=
create
:issue
,
project:
project
project
.
team
<<
[
@user
,
:master
]
end
2
.
times
{
create
:issue
,
author:
@user
,
assignee:
@user
,
project:
project
}
def
project
@project
||=
begin
project
=
create
:project_with_code
project
.
team
<<
[
current_user
,
:master
]
project
end
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