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
e44bb865
Commit
e44bb865
authored
Dec 11, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
175b4fa2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
.gitlab-ci.yml
.gitlab-ci.yml
+1
-1
app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue
...avascripts/vue_shared/components/stacked_progress_bar.vue
+4
-0
spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js
...cripts/vue_shared/components/stacked_progress_bar_spec.js
+6
-0
No files found.
.gitlab-ci.yml
View file @
e44bb865
...
...
@@ -17,7 +17,7 @@ variables:
RAILS_ENV
:
"
test"
NODE_ENV
:
"
test"
SIMPLECOV
:
"
true"
GIT_DEPTH
:
"
5
0"
GIT_DEPTH
:
"
2
0"
GIT_SUBMODULE_STRATEGY
:
"
none"
GET_SOURCES_ATTEMPTS
:
"
3"
KNAPSACK_RSPEC_SUITE_REPORT_PATH
:
knapsack/report-master.json
...
...
app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue
View file @
e44bb865
...
...
@@ -71,6 +71,10 @@ export default {
},
methods
:
{
getPercent
(
count
)
{
if
(
!
this
.
totalCount
)
{
return
0
;
}
const
percent
=
roundOffFloat
((
count
/
this
.
totalCount
)
*
100
,
1
);
if
(
percent
>
0
&&
percent
<
1
)
{
return
'
< 1
'
;
...
...
spec/javascripts/vue_shared/components/stacked_progress_bar_spec.js
View file @
e44bb865
...
...
@@ -53,6 +53,12 @@ describe('StackedProgressBarComponent', () => {
it
(
'
returns percentage as `< 1` from provided count based on `totalCount` when evaluated value is less than 1
'
,
()
=>
{
expect
(
vm
.
getPercent
(
10
)).
toBe
(
'
< 1
'
);
});
it
(
'
returns 0 if totalCount is falsy
'
,
()
=>
{
vm
=
createComponent
({
totalCount
:
0
});
expect
(
vm
.
getPercent
(
100
)).
toBe
(
0
);
});
});
describe
(
'
barStyle
'
,
()
=>
{
...
...
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