Commit 821936f8 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'fix-version-dropdown' into 'master'

Fix designCollection object after design is uploaded

See merge request gitlab-org/gitlab!68521
parents 5cae1278 1c367ecf
fragment VersionListItem on DesignVersion {
id
sha
createdAt
author {
__typename
id
name
avatarUrl
}
}
#import "../fragments/design.fragment.graphql"
#import "../fragments/version.fragment.graphql"
mutation uploadDesign($files: [Upload!]!, $projectPath: ID!, $iid: ID!) {
designManagementUpload(input: { projectPath: $projectPath, iid: $iid, files: $files }) {
designs {
...DesignItem
versions {
__typename
nodes {
id
sha
__typename
...VersionListItem
}
}
}
......
......@@ -85,6 +85,13 @@ export const designUploadOptimisticResponse = (files) => {
__typename: 'DesignVersion',
id: -uniqueId(),
sha: -uniqueId(),
createdAt: '',
author: {
__typename: 'UserCore',
id: -uniqueId(),
name: '',
avatarUrl: '',
},
},
},
}));
......
......@@ -338,6 +338,13 @@ describe('Design management index page', () => {
__typename: 'DesignVersion',
id: expect.anything(),
sha: expect.anything(),
createdAt: '',
author: {
__typename: 'UserCore',
id: expect.anything(),
name: '',
avatarUrl: '',
},
},
},
},
......
......@@ -101,7 +101,13 @@ describe('optimistic responses', () => {
discussions: { __typename: 'DesignDiscussion', nodes: [] },
versions: {
__typename: 'DesignVersionConnection',
nodes: { __typename: 'DesignVersion', id: -1, sha: -1 },
nodes: {
__typename: 'DesignVersion',
id: expect.anything(),
sha: expect.anything(),
createdAt: '',
author: { __typename: 'UserCore', avatarUrl: '', name: '', id: expect.anything() },
},
},
},
],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment