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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9de5ec5c
Commit
9de5ec5c
authored
Mar 24, 2017
by
Naveen Kumar
Committed by
Alfredo Sumaran
Mar 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding non_archived scope for counting projects
parent
48079c31
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
1 deletion
+25
-1
app/views/shared/groups/_group.html.haml
app/views/shared/groups/_group.html.haml
+1
-1
changelogs/unreleased/23862-fix-group-project-count.yml
changelogs/unreleased/23862-fix-group-project-count.yml
+4
-0
spec/features/explore/groups_list_spec.rb
spec/features/explore/groups_list_spec.rb
+20
-0
No files found.
app/views/shared/groups/_group.html.haml
View file @
9de5ec5c
...
...
@@ -17,7 +17,7 @@
.stats
%span
=
icon
(
'bookmark'
)
=
number_with_delimiter
(
group
.
projects
.
count
)
=
number_with_delimiter
(
group
.
projects
.
non_archived
.
count
)
%span
=
icon
(
'users'
)
...
...
changelogs/unreleased/23862-fix-group-project-count.yml
0 → 100644
View file @
9de5ec5c
---
title
:
Adding non_archived scope for counting projects
merge_request
:
8305
author
:
Naveen Kumar
spec/features/explore/groups_list_spec.rb
View file @
9de5ec5c
...
...
@@ -7,6 +7,7 @@ describe 'Explore Groups page', js: true, feature: true do
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:public_group
)
{
create
(
:group
,
:public
)
}
let!
(
:private_group
)
{
create
(
:group
,
:private
)
}
let!
(
:empty_project
)
{
create
(
:empty_project
,
group:
public_group
)
}
before
do
group
.
add_owner
(
user
)
...
...
@@ -43,4 +44,23 @@ describe 'Explore Groups page', js: true, feature: true do
expect
(
page
).
not_to
have_content
(
private_group
.
full_name
)
expect
(
page
.
all
(
'.js-groups-list-holder .content-list li'
).
length
).
to
eq
2
end
it
'shows non-archived projects count'
do
# Initially project is not archived
expect
(
find
(
'.js-groups-list-holder .content-list li:first-child .stats span:first-child'
)).
to
have_text
(
"1"
)
# Archive project
empty_project
.
archive!
visit
explore_groups_path
# Check project count
expect
(
find
(
'.js-groups-list-holder .content-list li:first-child .stats span:first-child'
)).
to
have_text
(
"0"
)
# Unarchive project
empty_project
.
unarchive!
visit
explore_groups_path
# Check project count
expect
(
find
(
'.js-groups-list-holder .content-list li:first-child .stats span:first-child'
)).
to
have_text
(
"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