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
38b57192
Commit
38b57192
authored
Aug 03, 2021
by
NataliaTepluhina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added timeout for the call
parent
3f862485
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
...mponents/sidebar/labels_select_vue/labels_select_root.vue
+1
-1
spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/mutations_spec.js
...ponents/sidebar/labels_select_vue/store/mutations_spec.js
+22
-0
No files found.
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
View file @
38b57192
...
...
@@ -142,7 +142,7 @@ export default {
this
.
setInitialState
({
selectedLabels
,
});
this
.
updateLabelsSetState
(
);
setTimeout
(()
=>
this
.
updateLabelsSetState
(),
100
);
},
showDropdownContents
(
showDropdownContents
)
{
this
.
setContentIsOnViewport
(
showDropdownContents
);
...
...
spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/mutations_spec.js
View file @
38b57192
...
...
@@ -197,4 +197,26 @@ describe('LabelsSelect Mutations', () => {
});
});
});
describe
(
`
${
types
.
UPDATE_LABELS_SET_STATE
}
`
,
()
=>
{
it
(
'
updates labels `set` state to match selected labels
'
,
()
=>
{
const
state
=
{
labels
:
[
{
id
:
1
,
title
:
'
scoped::test
'
,
set
:
false
},
{
id
:
2
,
set
:
true
,
title
:
'
scoped::one
'
,
touched
:
true
},
{
id
:
3
,
title
:
''
},
{
id
:
4
,
title
:
''
},
],
selectedLabels
:
[{
id
:
1
},
{
id
:
3
}],
};
mutations
[
types
.
UPDATE_LABELS_SET_STATE
](
state
);
expect
(
state
.
labels
).
toEqual
([
{
id
:
1
,
title
:
'
scoped::test
'
,
set
:
true
},
{
id
:
2
,
set
:
false
,
title
:
'
scoped::one
'
,
touched
:
true
},
{
id
:
3
,
title
:
''
,
set
:
true
},
{
id
:
4
,
title
:
''
,
set
:
false
},
]);
});
});
});
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