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
28db37de
Commit
28db37de
authored
Sep 01, 2016
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added todo filter tests
parent
e67a4837
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
20 deletions
+63
-20
features/dashboard/todos.feature
features/dashboard/todos.feature
+0
-20
spec/features/todos/todos_filtering_spec.rb
spec/features/todos/todos_filtering_spec.rb
+63
-0
No files found.
features/dashboard/todos.feature
View file @
28db37de
...
...
@@ -22,26 +22,6 @@ Feature: Dashboard Todos
And
I mark all todos as done
Then
I should see all todos marked as done
@javascript
Scenario
:
I
filter by project
Given
I filter by
"Enterprise"
Then
I should not see todos
@javascript
Scenario
:
I
filter by author
Given
I filter by
"John Doe"
Then
I should not see todos related to
"Mary Jane"
in the list
@javascript
Scenario
:
I
filter by type
Given
I filter by
"Issue"
Then
I should not see todos related to
"Merge Requests"
in the list
@javascript
Scenario
:
I
filter by action
Given
I filter by
"Mentioned"
Then
I should not see todos related to
"Assignments"
in the list
@javascript
Scenario
:
I
click on a todo row
Given
I click on the todo
...
...
spec/features/todos/todos_filtering_spec.rb
0 → 100644
View file @
28db37de
require
'spec_helper'
describe
'Dashboard > User filters todos'
,
feature:
true
,
js:
true
do
include
WaitForAjax
let
(
:user_1
)
{
create
(
:user
,
username:
'user_1'
,
name:
'user_1'
)
}
let
(
:user_2
)
{
create
(
:user
,
username:
'user_2'
,
name:
'user_2'
)
}
let
(
:project_1
)
{
create
(
:empty_project
,
name:
'project_1'
)
}
let
(
:project_2
)
{
create
(
:empty_project
,
name:
'project_2'
)
}
let
(
:issue
)
{
create
(
:issue
,
title:
'issue'
,
project:
project_1
)
}
let!
(
:merge_request
)
{
create
(
:merge_request
,
source_project:
project_2
,
title:
'merge_request'
)
}
before
do
create
(
:todo
,
user:
user_1
,
author:
user_2
,
project:
project_1
,
target:
issue
,
action:
1
)
create
(
:todo
,
user:
user_1
,
author:
user_1
,
project:
project_2
,
target:
merge_request
,
action:
2
)
project_1
.
team
<<
[
user_1
,
:developer
]
project_2
.
team
<<
[
user_1
,
:developer
]
login_as
(
user_1
)
visit
dashboard_todos_path
end
it
'filters by project'
do
click_button
'Project'
within
'.dropdown-menu-project'
do
fill_in
'Search projects'
,
with:
project_1
.
name_with_namespace
click_link
project_1
.
name_with_namespace
end
wait_for_ajax
expect
(
'.prepend-top-default'
).
not_to
have_content
project_2
.
name_with_namespace
end
it
'filters by author'
do
click_button
'Author'
within
'.dropdown-menu-author'
do
fill_in
'Search authors'
,
with:
user_1
.
name
click_link
user_1
.
name
end
wait_for_ajax
expect
(
'.prepend-top-default'
).
not_to
have_content
user_2
.
name
end
it
'filters by type'
do
click_button
'Type'
within
'.dropdown-menu-type'
do
click_link
'Issue'
end
wait_for_ajax
expect
(
'.prepend-top-default'
).
not_to
have_content
' merge request !'
end
it
'filters by action'
do
click_button
'Action'
within
'.dropdown-menu-action'
do
click_link
'Assigned'
end
wait_for_ajax
expect
(
'.prepend-top-default'
).
not_to
have_content
' mentioned '
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