Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #140 Submit app update screenshot 5 to use a valid uri #151

Merged
merged 3 commits into from
Jan 31, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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