Skip to content

Commit

Permalink
fix: #140 Submit app update screenshot 5 to use a valid uri (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
dannd4 authored Jan 31, 2020
1 parent 1ca0f76 commit 8c546c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/marketplace/src/sagas/__tests__/submit-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ describe('submit-app post data', () => {
generateDumpPromise(),
generateDumpPromise(),
generateDumpPromise(),
generateDumpPromise(),
]
const imageUploaderResults = [
{ Url: 'base64 string...' },
{ Url: 'base64 string...' },
{ Url: 'base64 string...' },
{ Url: 'base64 string...' },
{ Url: 'base64 string...' },
{ Url: 'base64 string...' },
]
const updatedData = {
...appSubmitStub.data,
Expand All @@ -46,6 +48,7 @@ describe('submit-app post data', () => {
screen2ImageUrl: 'base64 string...',
screen3ImageUrl: 'base64 string...',
screen4ImageUrl: 'base64 string...',
screen5ImageUrl: 'base64 string...',
}

const gen = cloneableGenerator(submitAppSaga)(params)
Expand Down
3 changes: 3 additions & 0 deletions packages/marketplace/src/sagas/submit-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export const submitApp = function*({ data }: Action<SubmitAppArgs>) {
screen2ImageUrl,
screen3ImageUrl,
screen4ImageUrl,
screen5ImageUrl,
categoryId,
} = values

Expand All @@ -58,6 +59,7 @@ export const submitApp = function*({ data }: Action<SubmitAppArgs>) {
imageUploaderHelper({ name: `${formatedName}-screen2ImageUrl`, imageData: screen2ImageUrl }),
imageUploaderHelper({ name: `${formatedName}-screen3ImageUrl`, imageData: screen3ImageUrl }),
imageUploaderHelper({ name: `${formatedName}-screen4ImageUrl`, imageData: screen4ImageUrl }),
imageUploaderHelper({ name: `${formatedName}-screen5ImageUrl`, imageData: screen5ImageUrl }),
]

const imageUploaderResults = yield all(imageUploaderReqs)
Expand All @@ -68,6 +70,7 @@ export const submitApp = function*({ data }: Action<SubmitAppArgs>) {
screen2ImageUrl: imageUploaderResults[2] ? imageUploaderResults[2].Url : '',
screen3ImageUrl: imageUploaderResults[3] ? imageUploaderResults[3].Url : '',
screen4ImageUrl: imageUploaderResults[4] ? imageUploaderResults[4].Url : '',
screen5ImageUrl: imageUploaderResults[5] ? imageUploaderResults[5].Url : '',
}

const updatedValuesAfterValidatingCategoryId = {
Expand Down

0 comments on commit 8c546c0

Please sign in to comment.