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
c9ba63ee
Commit
c9ba63ee
authored
Oct 08, 2020
by
Nicolò Maria Mezzopera
Committed by
Kushal Pandya
Oct 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shared component dynamic slot names
- source - tests
parent
9cbbfab1
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
20 deletions
+20
-20
app/assets/javascripts/packages/details/components/package_title.vue
...javascripts/packages/details/components/package_title.vue
+5
-5
app/assets/javascripts/packages/list/components/package_title.vue
...ts/javascripts/packages/list/components/package_title.vue
+1
-1
app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
...gistry/explorer/components/details_page/tags_list_row.vue
+3
-3
app/assets/javascripts/registry/explorer/components/list_page/registry_header.vue
...egistry/explorer/components/list_page/registry_header.vue
+2
-2
app/assets/javascripts/vue_shared/components/registry/list_item.vue
.../javascripts/vue_shared/components/registry/list_item.vue
+1
-1
app/assets/javascripts/vue_shared/components/registry/title_area.vue
...javascripts/vue_shared/components/registry/title_area.vue
+1
-1
spec/frontend/vue_shared/components/registry/list_item_spec.js
...frontend/vue_shared/components/registry/list_item_spec.js
+4
-4
spec/frontend/vue_shared/components/registry/title_area_spec.js
...rontend/vue_shared/components/registry/title_area_spec.js
+3
-3
No files found.
app/assets/javascripts/packages/details/components/package_title.vue
View file @
c9ba63ee
...
...
@@ -54,15 +54,15 @@ export default {
</gl-sprintf>
</template>
<
template
v-if=
"packageTypeDisplay"
#metadata
_
type
>
<
template
v-if=
"packageTypeDisplay"
#metadata
-
type
>
<metadata-item
data-testid=
"package-type"
icon=
"package"
:text=
"packageTypeDisplay"
/>
</
template
>
<
template
#metadata
_
size
>
<
template
#metadata
-
size
>
<metadata-item
data-testid=
"package-size"
icon=
"disk"
:text=
"totalSize"
/>
</
template
>
<
template
v-if=
"packagePipeline"
#metadata
_
pipeline
>
<
template
v-if=
"packagePipeline"
#metadata
-
pipeline
>
<metadata-item
data-testid=
"pipeline-project"
icon=
"review-list"
...
...
@@ -71,11 +71,11 @@ export default {
/>
</
template
>
<
template
v-if=
"packagePipeline"
#metadata
_
ref
>
<
template
v-if=
"packagePipeline"
#metadata
-
ref
>
<metadata-item
data-testid=
"package-ref"
icon=
"branch"
:text=
"packagePipeline.ref"
/>
</
template
>
<
template
v-if=
"hasTagsToDisplay"
#metadata
_
tags
>
<
template
v-if=
"hasTagsToDisplay"
#metadata
-
tags
>
<package-tags
:tag-display-limit=
"2"
:tags=
"packageEntity.tags"
hide-label
/>
</
template
>
...
...
app/assets/javascripts/packages/list/components/package_title.vue
View file @
c9ba63ee
...
...
@@ -40,7 +40,7 @@ export default {
<
template
>
<title-area
:title=
"$options.i18n.LIST_TITLE_TEXT"
:info-messages=
"infoMessages"
>
<template
#metadata
_
amount
>
<template
#metadata
-
amount
>
<metadata-item
v-if=
"showPackageCount"
icon=
"package"
:text=
"packageAmountText"
/>
</
template
>
</title-area>
...
...
app/assets/javascripts/registry/explorer/components/details_page/tags_list_row.vue
View file @
c9ba63ee
...
...
@@ -171,7 +171,7 @@ export default {
/>
</
template
>
<
template
v-if=
"!invalidTag"
#details
_
published
>
<
template
v-if=
"!invalidTag"
#details
-
published
>
<details-row
icon=
"clock"
data-testid=
"published-date-detail"
>
<gl-sprintf
:message=
"$options.i18n.PUBLISHED_DETAILS_ROW_TEXT"
>
<template
#repositoryPath
>
...
...
@@ -186,7 +186,7 @@ export default {
</gl-sprintf>
</details-row>
</template>
<
template
v-if=
"!invalidTag"
#details
_manifest_
digest
>
<
template
v-if=
"!invalidTag"
#details
-manifest-
digest
>
<details-row
icon=
"log"
data-testid=
"manifest-detail"
>
<gl-sprintf
:message=
"$options.i18n.MANIFEST_DETAILS_ROW_TEST"
>
<template
#digest
>
...
...
@@ -202,7 +202,7 @@ export default {
/>
</details-row>
</template>
<
template
v-if=
"!invalidTag"
#details
_configuration_
digest
>
<
template
v-if=
"!invalidTag"
#details
-configuration-
digest
>
<details-row
icon=
"cloud-gear"
data-testid=
"configuration-detail"
>
<gl-sprintf
:message=
"$options.i18n.CONFIGURATION_DETAILS_ROW_TEST"
>
<template
#digest
>
...
...
app/assets/javascripts/registry/explorer/components/list_page/registry_header.vue
View file @
c9ba63ee
...
...
@@ -96,7 +96,7 @@ export default {
<template
#right-actions
>
<slot
name=
"commands"
></slot>
</
template
>
<
template
#metadata
_
count
>
<
template
#metadata
-
count
>
<metadata-item
v-if=
"imagesCount"
data-testid=
"images-count"
...
...
@@ -104,7 +104,7 @@ export default {
:text=
"imagesCountText"
/>
</
template
>
<
template
#metadata
_exp_
policies
>
<
template
#metadata
-exp-
policies
>
<metadata-item
v-if=
"!hideExpirationPolicyData"
data-testid=
"expiration-policy"
...
...
app/assets/javascripts/vue_shared/components/registry/list_item.vue
View file @
c9ba63ee
...
...
@@ -39,7 +39,7 @@ export default {
},
},
mounted
()
{
this
.
detailsSlots
=
Object
.
keys
(
this
.
$slots
).
filter
(
k
=>
k
.
startsWith
(
'
details
_
'
));
this
.
detailsSlots
=
Object
.
keys
(
this
.
$slots
).
filter
(
k
=>
k
.
startsWith
(
'
details
-
'
));
},
methods
:
{
toggleDetails
()
{
...
...
app/assets/javascripts/vue_shared/components/registry/title_area.vue
View file @
c9ba63ee
...
...
@@ -31,7 +31,7 @@ export default {
};
},
mounted
()
{
this
.
metadataSlots
=
Object
.
keys
(
this
.
$slots
).
filter
(
k
=>
k
.
startsWith
(
'
metadata
_
'
));
this
.
metadataSlots
=
Object
.
keys
(
this
.
$slots
).
filter
(
k
=>
k
.
startsWith
(
'
metadata
-
'
));
},
};
</
script
>
...
...
spec/frontend/vue_shared/components/registry/list_item_spec.js
View file @
c9ba63ee
...
...
@@ -58,9 +58,9 @@ describe('list item', () => {
describe
.
each
`
slotNames
${[
'
details
_
foo
'
]}
${[
'
details
_foo
'
,
'
details_
bar
'
]}
${[
'
details
_foo
'
,
'
details_bar
'
,
'
details_
baz
'
]}
${[
'
details
-
foo
'
]}
${[
'
details
-foo
'
,
'
details-
bar
'
]}
${[
'
details
-foo
'
,
'
details-bar
'
,
'
details-
baz
'
]}
`
(
'
$slotNames details slots
'
,
({
slotNames
})
=>
{
const
slotMocks
=
slotNames
.
reduce
((
acc
,
current
)
=>
{
acc
[
current
]
=
`<div data-testid="
${
current
}
" />`
;
...
...
@@ -89,7 +89,7 @@ describe('list item', () => {
describe
(
'
details toggle button
'
,
()
=>
{
it
(
'
is visible when at least one details slot exists
'
,
async
()
=>
{
mountComponent
({},
{
details_foo
:
'
<span></span>
'
});
mountComponent
({},
{
'
details-foo
'
:
'
<span></span>
'
});
await
wrapper
.
vm
.
$nextTick
();
expect
(
findToggleDetailsButton
().
exists
()).
toBe
(
true
);
});
...
...
spec/frontend/vue_shared/components/registry/title_area_spec.js
View file @
c9ba63ee
...
...
@@ -79,9 +79,9 @@ describe('title area', () => {
describe
.
each
`
slotNames
${[
'
metadata
_
foo
'
]}
${[
'
metadata
_foo
'
,
'
metadata_
bar
'
]}
${[
'
metadata
_foo
'
,
'
metadata_bar
'
,
'
metadata_
baz
'
]}
${[
'
metadata
-
foo
'
]}
${[
'
metadata
-foo
'
,
'
metadata-
bar
'
]}
${[
'
metadata
-foo
'
,
'
metadata-bar
'
,
'
metadata-
baz
'
]}
`
(
'
$slotNames metadata slots
'
,
({
slotNames
})
=>
{
const
slotMocks
=
slotNames
.
reduce
((
acc
,
current
)
=>
{
acc
[
current
]
=
`<div data-testid="
${
current
}
" />`
;
...
...
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