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
e0b8384e
Commit
e0b8384e
authored
Oct 14, 2020
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make trackUploadDesign more robust
Fall back to empty array for designs in response.
parent
70cbe985
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/assets/javascripts/design_management/pages/index.vue
app/assets/javascripts/design_management/pages/index.vue
+1
-1
spec/frontend/design_management/pages/index_spec.js
spec/frontend/design_management/pages/index_spec.js
+1
-1
No files found.
app/assets/javascripts/design_management/pages/index.vue
View file @
e0b8384e
...
...
@@ -204,7 +204,7 @@ export default {
this
.
trackUploadDesign
(
res
);
},
trackUploadDesign
(
res
)
{
res
.
data
.
designManagementUpload
.
designs
.
forEach
(
design
=>
{
(
res
?.
data
?.
designManagementUpload
?.
designs
||
[])
.
forEach
(
design
=>
{
if
(
design
.
event
===
'
CREATION
'
)
{
trackDesignCreate
();
}
else
if
(
design
.
event
===
'
MODIFICATION
'
)
{
...
...
spec/frontend/design_management/pages/index_spec.js
View file @
e0b8384e
...
...
@@ -374,7 +374,7 @@ describe('Design management index page', () => {
createComponent
({
stubs
:
{
GlEmptyState
}
});
wrapper
.
setData
({
filesToBeSaved
:
[{
name
:
'
test
'
}]
});
wrapper
.
vm
.
onUploadDesignDone
();
wrapper
.
vm
.
onUploadDesignDone
(
designUploadMutationCreatedResponse
);
return
wrapper
.
vm
.
$nextTick
().
then
(()
=>
{
expect
(
wrapper
.
vm
.
filesToBeSaved
).
toEqual
([]);
expect
(
wrapper
.
vm
.
isSaving
).
toBeFalsy
();
...
...
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