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
8283e9e6
Commit
8283e9e6
authored
Jul 28, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change $emit invoke to single argument
parent
d0c3ad98
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
ee/app/assets/javascripts/related_items_tree/components/create_epic_form.vue
...cripts/related_items_tree/components/create_epic_form.vue
+1
-1
ee/app/assets/javascripts/related_items_tree/components/related_items_tree_app.vue
.../related_items_tree/components/related_items_tree_app.vue
+2
-2
ee/spec/frontend/related_items_tree/components/create_epic_form_spec.js
...nd/related_items_tree/components/create_epic_form_spec.js
+6
-1
ee/spec/frontend/related_items_tree/components/related_items_tree_app_spec.js
...ated_items_tree/components/related_items_tree_app_spec.js
+2
-1
No files found.
ee/app/assets/javascripts/related_items_tree/components/create_epic_form.vue
View file @
8283e9e6
...
...
@@ -93,7 +93,7 @@ export default {
...
mapActions
([
'
fetchDescendantGroups
'
]),
onFormSubmit
()
{
const
groupFullPath
=
this
.
selectedGroup
?.
full_path
;
this
.
$emit
(
'
createEpicFormSubmit
'
,
this
.
inputValue
.
trim
(),
groupFullPath
);
this
.
$emit
(
'
createEpicFormSubmit
'
,
{
value
:
this
.
inputValue
.
trim
(),
groupFullPath
}
);
},
onFormCancel
()
{
this
.
$emit
(
'
createEpicFormCancel
'
);
...
...
ee/app/assets/javascripts/related_items_tree/components/related_items_tree_app.vue
View file @
8283e9e6
...
...
@@ -135,9 +135,9 @@ export default {
this
.
addItem
();
}
},
handleCreateEpicFormSubmit
(
newValue
,
groupFullPath
)
{
handleCreateEpicFormSubmit
(
{
value
,
groupFullPath
}
)
{
this
.
createItem
({
itemTitle
:
newV
alue
,
itemTitle
:
v
alue
,
groupFullPath
,
});
},
...
...
ee/spec/frontend/related_items_tree/components/create_epic_form_spec.js
View file @
8283e9e6
...
...
@@ -112,7 +112,12 @@ describe('RelatedItemsTree', () => {
wrapper
.
vm
.
onFormSubmit
();
expect
(
wrapper
.
emitted
().
createEpicFormSubmit
).
toBeTruthy
();
expect
(
wrapper
.
emitted
().
createEpicFormSubmit
[
0
]).
toEqual
([
value
,
undefined
]);
expect
(
wrapper
.
emitted
().
createEpicFormSubmit
[
0
]).
toEqual
([
{
value
,
groupFullPath
:
undefined
,
},
]);
});
});
...
...
ee/spec/frontend/related_items_tree/components/related_items_tree_app_spec.js
View file @
8283e9e6
...
...
@@ -134,10 +134,11 @@ describe('RelatedItemsTreeApp', () => {
const
newValue
=
'
foo
'
;
jest
.
spyOn
(
wrapper
.
vm
,
'
createItem
'
).
mockImplementation
();
wrapper
.
vm
.
handleCreateEpicFormSubmit
(
newValue
);
wrapper
.
vm
.
handleCreateEpicFormSubmit
(
{
value
:
newValue
}
);
expect
(
wrapper
.
vm
.
createItem
).
toHaveBeenCalledWith
({
itemTitle
:
newValue
,
groupFullPath
:
undefined
,
});
});
});
...
...
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