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
6029f640
Commit
6029f640
authored
Oct 21, 2019
by
Natalia Tepluhina
Committed by
Filipa Lacerda
Oct 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Error when uploading a few designs in a row"
parent
c8f5576c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
changelogs/unreleased/34320-error-when-uploading-a-few-designs-in-a-row.yml
...sed/34320-error-when-uploading-a-few-designs-in-a-row.yml
+5
-0
ee/app/assets/javascripts/design_management/graphql.js
ee/app/assets/javascripts/design_management/graphql.js
+2
-1
ee/spec/features/projects/issues/design_management/user_uploads_designs_spec.rb
...cts/issues/design_management/user_uploads_designs_spec.rb
+9
-1
No files found.
changelogs/unreleased/34320-error-when-uploading-a-few-designs-in-a-row.yml
0 → 100644
View file @
6029f640
---
title
:
Resolve Error when uploading a few designs in a row
merge_request
:
18811
author
:
type
:
fixed
ee/app/assets/javascripts/design_management/graphql.js
View file @
6029f640
import
Vue
from
'
vue
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
_
from
'
underscore
'
;
import
{
defaultDataIdFromObject
}
from
'
apollo-cache-inmemory
'
;
import
createDefaultClient
from
'
~/lib/graphql
'
;
import
createFlash
from
'
~/flash
'
;
...
...
@@ -46,7 +47,7 @@ const defaultClient = createDefaultClient(
dataIdFromObject
:
object
=>
{
// eslint-disable-next-line no-underscore-dangle, @gitlab/i18n/no-non-i18n-strings
if
(
object
.
__typename
===
'
Design
'
)
{
return
object
.
id
&&
object
.
image
?
`
${
object
.
id
}
-
${
object
.
image
}
`
:
null
;
return
object
.
id
&&
object
.
image
?
`
${
object
.
id
}
-
${
object
.
image
}
`
:
_
.
uniqueId
()
;
}
return
defaultDataIdFromObject
(
object
);
},
...
...
ee/spec/features/projects/issues/design_management/user_uploads_designs_spec.rb
View file @
6029f640
...
...
@@ -24,7 +24,7 @@ describe 'User uploads new design', :js do
wait_for_requests
end
it
'uploads design'
do
it
'uploads design
s
'
do
attach_file
(
:design_file
,
logo_fixture
,
make_visible:
true
)
expect
(
page
).
to
have_selector
(
'.js-design-list-item'
,
count:
1
)
...
...
@@ -32,6 +32,10 @@ describe 'User uploads new design', :js do
within
first
(
'#designs-tab .card'
)
do
expect
(
page
).
to
have_content
(
'dk.png'
)
end
attach_file
(
:design_file
,
gif_fixture
,
make_visible:
true
)
expect
(
page
).
to
have_selector
(
'.js-design-list-item'
,
count:
2
)
end
end
...
...
@@ -48,4 +52,8 @@ describe 'User uploads new design', :js do
def
logo_fixture
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'dk.png'
)
end
def
gif_fixture
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'banana_sample.gif'
)
end
end
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