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
ed47410b
Commit
ed47410b
authored
Mar 26, 2021
by
Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maintainer feedback code changes
* Use gl-sprintf * Make test assertion more explicit
parent
a11d3701
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
+15
-10
ee/app/assets/javascripts/security_configuration/corpus_management/components/corpus_upload.vue
...figuration/corpus_management/components/corpus_upload.vue
+9
-3
ee/spec/frontend/security_configuration/corpus_management/components/__snapshots__/corpus_upload_spec.js.snap
...ement/components/__snapshots__/corpus_upload_spec.js.snap
+5
-6
ee/spec/frontend/security_configuration/corpus_management/components/corpus_upload_spec.js
...ration/corpus_management/components/corpus_upload_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/security_configuration/corpus_management/components/corpus_upload.vue
View file @
ed47410b
<
script
>
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
numberToHumanSize
}
from
'
~/lib/utils/number_utils
'
;
import
{
s__
}
from
'
~/locale
'
;
export
default
{
components
:
{
GlButton
,
GlSprintf
,
},
props
:
{
totalSize
:
{
...
...
@@ -14,7 +15,7 @@ export default {
},
},
i18n
:
{
totalSize
:
s__
(
'
CorpusManagement|Total Size:
'
),
totalSize
:
s__
(
'
CorpusManagement|Total Size:
%{totalSize}
'
),
newCorpus
:
s__
(
'
CorpusManagement|New corpus
'
),
},
computed
:
{
...
...
@@ -35,7 +36,12 @@ export default {
>
<div
class=
"gl-ml-5"
>
{{
this
.
$options
.
i18n
.
totalSize
}}
<span
class=
"gl-font-weight-bold"
>
{{
formattedFileSize
}}
</span>
<gl-sprintf
:message=
"$options.i18n.totalSize"
>
<template
#totalSize
>
<span
class=
"gl-font-weight-bold"
>
{{
formattedFileSize
}}
</span>
</
template
>
</gl-sprintf>
</div>
<gl-button
class=
"gl-mr-5"
category=
"primary"
variant=
"confirm"
@
click=
"newCorpus"
>
...
...
ee/spec/frontend/security_configuration/corpus_management/components/__snapshots__/corpus_upload_spec.js.snap
View file @
ed47410b
...
...
@@ -8,13 +8,12 @@ exports[`Corpus Upload component renders header 1`] = `
class="gl-ml-5"
>
Total Size:
Total Size: %{totalSize}
<span
class="gl-font-weight-bold"
>
381.47 MiB
</span>
<gl-sprintf-stub
message="Total Size: %{totalSize}"
/>
</div>
<gl-button-stub
...
...
ee/spec/frontend/security_configuration/corpus_management/components/corpus_upload_spec.js
View file @
ed47410b
...
...
@@ -30,7 +30,7 @@ describe('Corpus Upload', () => {
createComponent
({
stubs
:
{
GlButton
}
});
await
wrapper
.
findComponent
(
GlButton
).
trigger
(
'
click
'
);
expect
(
wrapper
.
emitted
().
newcorpus
).
to
BeTruthy
(
);
expect
(
wrapper
.
emitted
().
newcorpus
).
to
Equal
([[]]
);
});
});
});
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