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
7fa36610
Commit
7fa36610
authored
Nov 10, 2016
by
Lucas Deschamps
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve issuables_counter_spec relevance.
parent
677af1dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
8 deletions
+25
-8
spec/features/dashboard/issuables_counter_spec.rb
spec/features/dashboard/issuables_counter_spec.rb
+25
-8
No files found.
spec/features/dashboard/issuables_counter_spec.rb
View file @
7fa36610
require
'spec_helper'
describe
'Navigation bar counter'
,
feature:
true
,
js:
true
,
caching:
true
do
describe
'Navigation bar counter'
,
feature:
true
,
js:
true
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:empty_project
,
namespace:
user
.
namespace
)
}
before
do
login_as
(
user
)
visit
issues_dashboard_path
end
it
'reflects dashboard issues count'
do
create
(
:issue
,
project:
project
,
assignee:
user
)
issue
=
create
(
:issue
,
project:
project
,
assignee:
user
)
visit
issues_dashboard_path
dashboard_count
=
find
(
'li.active span.badge'
)
nav_count
=
find
(
'.dashboard-shortcuts-issues span.count'
)
expect
(
nav_count
).
to
have_content
(
'1'
)
expect
(
dashboard_count
).
to
have_content
(
'1'
)
issue
.
assignee
=
nil
visit
issues_dashboard_path
dashboard_count
=
find
(
'li.active span.badge'
)
nav_count
=
find
(
'.dashboard-shortcuts-issues span.count'
)
expect
(
dashboard_count
).
to
have_content
(
'0
'
)
expect
(
nav_count
).
to
have_content
(
'0
'
)
expect
(
nav_count
).
to
have_content
(
'1
'
)
expect
(
dashboard_count
).
to
have_content
(
'1
'
)
end
it
'reflects dashboard merge requests count'
do
create
(
:merge_request
,
assignee:
user
)
merge_request
=
create
(
:merge_request
,
source_project:
project
,
assignee:
user
)
visit
merge_requests_dashboard_path
dashboard_count
=
find
(
'li.active span.badge'
)
nav_count
=
find
(
'.dashboard-shortcuts-merge_requests span.count'
)
expect
(
nav_count
).
to
have_content
(
'1'
)
expect
(
dashboard_count
).
to
have_content
(
'1'
)
merge_request
.
assignee
=
nil
visit
merge_requests_dashboard_path
dashboard_count
=
find
(
'li.active span.badge'
)
nav_count
=
find
(
'.dashboard-shortcuts-merge_requests span.count'
)
expect
(
dashboard_count
).
to
have_content
(
'0
'
)
expect
(
nav_count
).
to
have_content
(
'0
'
)
expect
(
nav_count
).
to
have_content
(
'1
'
)
expect
(
dashboard_count
).
to
have_content
(
'1
'
)
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