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
5a04f8f7
Commit
5a04f8f7
authored
Apr 14, 2020
by
Nick Kipling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applying reviewer feedback
parent
3b531032
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
10 deletions
+16
-10
ee/app/assets/javascripts/packages/list/components/packages_list.vue
...ts/javascripts/packages/list/components/packages_list.vue
+3
-3
ee/app/assets/javascripts/packages/list/components/packages_list_row.vue
...avascripts/packages/list/components/packages_list_row.vue
+4
-3
ee/spec/frontend/packages/list/components/__snapshots__/packages_list_row_spec.js.snap
...t/components/__snapshots__/packages_list_row_spec.js.snap
+2
-0
ee/spec/frontend/packages/list/components/packages_list_spec.js
...c/frontend/packages/list/components/packages_list_spec.js
+7
-4
No files found.
ee/app/assets/javascripts/packages/list/components/packages_list.vue
View file @
5a04f8f7
...
...
@@ -96,9 +96,9 @@ export default {
<template
v-else
>
<div
data-qa-selector=
"packages-table"
>
<packages-list-row
v-for=
"p
k
in list"
:key=
"p
k
.id"
:package-entity=
"p
k
"
v-for=
"p
ackageEntity
in list"
:key=
"p
ackageEntity
.id"
:package-entity=
"p
ackageEntity
"
@
packageToDelete=
"setItemToBeDeleted"
/>
</div>
...
...
ee/app/assets/javascripts/packages/list/components/packages_list_row.vue
View file @
5a04f8f7
...
...
@@ -50,9 +50,10 @@ export default {
<div
class=
"gl-responsive-table-row"
data-qa-selector=
"packages-row"
>
<div
class=
"table-section section-50 d-flex flex-md-column justify-content-between flex-wrap"
>
<div
class=
"d-flex align-items-center mr-2"
>
<gl-link
:href=
"packageEntity._links.web_path"
class=
"text-dark font-weight-bold mb-md-1"
>
{{
packageEntity
.
name
}}
</gl-link>
<gl-link
:href=
"packageEntity._links.web_path"
class=
"text-dark font-weight-bold mb-md-1"
>
{{
packageEntity
.
name
}}
</gl-link>
<package-tags
v-if=
"packageEntity.tags && packageEntity.tags.length"
class=
"prepend-left-8"
...
...
ee/spec/frontend/packages/list/components/__snapshots__/packages_list_row_spec.js.snap
View file @
5a04f8f7
...
...
@@ -15,7 +15,9 @@ exports[`packages_list_row renders 1`] = `
class="text-dark font-weight-bold mb-md-1"
href="foo"
>
Test package
</gl-link-stub>
<!---->
...
...
ee/spec/frontend/packages/list/components/packages_list_spec.js
View file @
5a04f8f7
...
...
@@ -5,6 +5,7 @@ import Tracking from '~/tracking';
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
PackagesList
from
'
ee/packages/list/components/packages_list.vue
'
;
import
PackagesListLoader
from
'
ee/packages/list/components/packages_list_loader.vue
'
;
import
PackagesListRow
from
'
ee/packages/list/components/packages_list_row.vue
'
;
import
*
as
SharedUtils
from
'
ee/packages/shared/utils
'
;
import
{
TrackingActions
}
from
'
ee/packages/shared/constants
'
;
import
stubChildren
from
'
helpers/stub_children
'
;
...
...
@@ -24,6 +25,7 @@ describe('packages_list', () => {
const
findPackageListPagination
=
()
=>
wrapper
.
find
(
GlPagination
);
const
findPackageListDeleteModal
=
()
=>
wrapper
.
find
(
GlModal
);
const
findEmptySlot
=
()
=>
wrapper
.
find
({
name
:
'
empty-slot-stub
'
});
const
findPackagesListRow
=
()
=>
wrapper
.
find
(
PackagesListRow
);
const
createStore
=
(
isGroupPage
,
packages
,
isLoading
)
=>
{
const
state
=
{
...
...
@@ -66,6 +68,7 @@ describe('packages_list', () => {
...
stubChildren
(
PackagesList
),
GlTable
,
GlSortingItem
,
GlModal
,
},
...
options
,
});
...
...
@@ -130,14 +133,14 @@ describe('packages_list', () => {
});
it
(
'
setItemToBeDeleted sets itemToBeDeleted and open the modal
'
,
()
=>
{
wrapper
.
vm
.
$refs
.
packageListDeleteModal
.
show
=
jest
.
fn
();
const
mockModalShow
=
jest
.
spyOn
(
wrapper
.
vm
.
$refs
.
packageListDeleteModal
,
'
show
'
);
const
item
=
last
(
wrapper
.
vm
.
list
);
wrapper
.
vm
.
setItemToBeDeleted
(
item
);
findPackagesListRow
().
vm
.
$emit
(
'
packageToDelete
'
,
item
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
vm
.
itemToBeDeleted
).
toEqual
(
item
);
expect
(
wrapper
.
vm
.
$refs
.
packageListDeleteModal
.
s
how
).
toHaveBeenCalled
();
expect
(
mockModalS
how
).
toHaveBeenCalled
();
});
});
...
...
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