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
802f0b38
Commit
802f0b38
authored
Jan 07, 2020
by
Nicolò Maria Mezzopera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address reviewer feedback
- collapsible container - table registry - app spec
parent
4d83f4de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
spec/frontend/registry/list/components/app_spec.js
spec/frontend/registry/list/components/app_spec.js
+0
-1
spec/frontend/registry/list/components/collapsible_container_spec.js
...nd/registry/list/components/collapsible_container_spec.js
+2
-4
spec/frontend/registry/list/components/table_registry_spec.js
.../frontend/registry/list/components/table_registry_spec.js
+10
-9
No files found.
spec/frontend/registry/list/components/app_spec.js
View file @
802f0b38
...
@@ -36,7 +36,6 @@ describe('Registry List', () => {
...
@@ -36,7 +36,6 @@ describe('Registry List', () => {
beforeEach
(()
=>
{
beforeEach
(()
=>
{
wrapper
=
mount
(
registry
,
{
wrapper
=
mount
(
registry
,
{
attachToDocument
:
true
,
attachToDocument
:
true
,
sync
:
false
,
propsData
,
propsData
,
computed
:
{
computed
:
{
repos
()
{
repos
()
{
...
...
spec/frontend/registry/list/components/collapsible_container_spec.js
View file @
802f0b38
...
@@ -27,7 +27,6 @@ describe('collapsible registry container', () => {
...
@@ -27,7 +27,6 @@ describe('collapsible registry container', () => {
store
,
store
,
localVue
,
localVue
,
attachToDocument
:
true
,
attachToDocument
:
true
,
sync
:
false
,
});
});
beforeEach
(()
=>
{
beforeEach
(()
=>
{
...
@@ -77,14 +76,13 @@ describe('collapsible registry container', () => {
...
@@ -77,14 +76,13 @@ describe('collapsible registry container', () => {
});
});
});
});
it
(
'
should be closed when the user clicks on an opened repo
'
,
done
=>
{
it
(
'
should be closed when the user clicks on an opened repo
'
,
()
=>
{
const
toggleRepos
=
findToggleRepos
();
const
toggleRepos
=
findToggleRepos
();
toggleRepos
.
at
(
0
).
trigger
(
'
click
'
);
toggleRepos
.
at
(
0
).
trigger
(
'
click
'
);
wrapper
.
vm
.
$nextTick
(()
=>
{
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
toggleRepos
.
at
(
0
).
trigger
(
'
click
'
);
toggleRepos
.
at
(
0
).
trigger
(
'
click
'
);
wrapper
.
vm
.
$nextTick
(()
=>
{
wrapper
.
vm
.
$nextTick
(()
=>
{
expectIsClosed
();
expectIsClosed
();
done
();
});
});
});
});
});
});
...
...
spec/frontend/registry/list/components/table_registry_spec.js
View file @
802f0b38
...
@@ -28,7 +28,7 @@ describe('table registry', () => {
...
@@ -28,7 +28,7 @@ describe('table registry', () => {
const
bulkDeletePath
=
'
path
'
;
const
bulkDeletePath
=
'
path
'
;
const
mountWithStore
=
config
=>
const
mountWithStore
=
config
=>
mount
(
tableRegistry
,
{
...
config
,
store
,
localVue
,
attachToDocument
:
true
,
sync
:
false
});
mount
(
tableRegistry
,
{
...
config
,
store
,
localVue
,
attachToDocument
:
true
});
beforeEach
(()
=>
{
beforeEach
(()
=>
{
store
=
new
Vuex
.
Store
({
store
=
new
Vuex
.
Store
({
...
@@ -111,15 +111,18 @@ describe('table registry', () => {
...
@@ -111,15 +111,18 @@ describe('table registry', () => {
});
});
});
});
it
(
'
should delete multiple items when multiple items are selected
'
,
done
=>
{
it
(
'
should delete multiple items when multiple items are selected
'
,
()
=>
{
const
multiDeleteItems
=
jest
.
fn
().
mockResolvedValue
();
const
multiDeleteItems
=
jest
.
fn
().
mockResolvedValue
();
wrapper
.
setMethods
({
multiDeleteItems
});
wrapper
.
setMethods
({
multiDeleteItems
});
wrapper
.
vm
.
$nextTick
(()
=>
{
return
wrapper
.
vm
const
selectAll
=
findSelectAllCheckbox
();
.
$nextTick
()
selectAll
.
trigger
(
'
click
'
);
.
then
(()
=>
{
const
selectAll
=
findSelectAllCheckbox
();
wrapper
.
vm
.
$nextTick
(()
=>
{
selectAll
.
trigger
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
();
})
.
then
(()
=>
{
const
deleteBtn
=
findDeleteButton
();
const
deleteBtn
=
findDeleteButton
();
expect
(
wrapper
.
vm
.
selectedItems
).
toEqual
([
0
,
1
]);
expect
(
wrapper
.
vm
.
selectedItems
).
toEqual
([
0
,
1
]);
expect
(
deleteBtn
.
attributes
(
'
disabled
'
)).
toEqual
(
undefined
);
expect
(
deleteBtn
.
attributes
(
'
disabled
'
)).
toEqual
(
undefined
);
...
@@ -131,9 +134,7 @@ describe('table registry', () => {
...
@@ -131,9 +134,7 @@ describe('table registry', () => {
path
:
bulkDeletePath
,
path
:
bulkDeletePath
,
items
:
[
firstImage
.
tag
,
secondImage
.
tag
],
items
:
[
firstImage
.
tag
,
secondImage
.
tag
],
});
});
done
();
});
});
});
});
});
it
(
'
should show an error message if bulkDeletePath is not set
'
,
()
=>
{
it
(
'
should show an error message if bulkDeletePath is not set
'
,
()
=>
{
...
...
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