Commit 8f3d8a94 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '210339-improve-format-support-message-in-issue-design' into 'master'

Resolve "Improve format support message in issue design"

See merge request gitlab-org/gitlab!27409
parents 7945b2c3 392ca150
---
title: Resolve Improve format support message in issue design
merge_request: 27409
author:
type: fixed
...@@ -4,7 +4,6 @@ import { ...@@ -4,7 +4,6 @@ import {
ADD_IMAGE_DIFF_NOTE_ERROR, ADD_IMAGE_DIFF_NOTE_ERROR,
UPDATE_IMAGE_DIFF_NOTE_ERROR, UPDATE_IMAGE_DIFF_NOTE_ERROR,
ADD_DISCUSSION_COMMENT_ERROR, ADD_DISCUSSION_COMMENT_ERROR,
UPLOAD_DESIGN_ERROR,
designDeletionError, designDeletionError,
} from './error_messages'; } from './error_messages';
...@@ -292,7 +291,7 @@ export const updateStoreAfterUpdateImageDiffNote = (store, data, query, queryVar ...@@ -292,7 +291,7 @@ export const updateStoreAfterUpdateImageDiffNote = (store, data, query, queryVar
export const updateStoreAfterUploadDesign = (store, data, query) => { export const updateStoreAfterUploadDesign = (store, data, query) => {
if (hasErrors(data)) { if (hasErrors(data)) {
onError(data, UPLOAD_DESIGN_ERROR); onError(data, data.errors[0]);
} else { } else {
addNewDesignToStore(store, data, query); addNewDesignToStore(store, data, query);
} }
......
...@@ -10,7 +10,6 @@ import { ...@@ -10,7 +10,6 @@ import {
designDeletionError, designDeletionError,
ADD_DISCUSSION_COMMENT_ERROR, ADD_DISCUSSION_COMMENT_ERROR,
ADD_IMAGE_DIFF_NOTE_ERROR, ADD_IMAGE_DIFF_NOTE_ERROR,
UPLOAD_DESIGN_ERROR,
UPDATE_IMAGE_DIFF_NOTE_ERROR, UPDATE_IMAGE_DIFF_NOTE_ERROR,
} from 'ee/design_management/utils/error_messages'; } from 'ee/design_management/utils/error_messages';
import design from '../mock_data/design'; import design from '../mock_data/design';
...@@ -33,7 +32,7 @@ describe('Design Management cache update', () => { ...@@ -33,7 +32,7 @@ describe('Design Management cache update', () => {
${'updateStoreAfterDesignsDelete'} | ${updateStoreAfterDesignsDelete} | ${designDeletionError({ singular: true })} | ${[[design]]} ${'updateStoreAfterDesignsDelete'} | ${updateStoreAfterDesignsDelete} | ${designDeletionError({ singular: true })} | ${[[design]]}
${'updateStoreAfterAddDiscussionComment'} | ${updateStoreAfterAddDiscussionComment} | ${ADD_DISCUSSION_COMMENT_ERROR} | ${[]} ${'updateStoreAfterAddDiscussionComment'} | ${updateStoreAfterAddDiscussionComment} | ${ADD_DISCUSSION_COMMENT_ERROR} | ${[]}
${'updateStoreAfterAddImageDiffNote'} | ${updateStoreAfterAddImageDiffNote} | ${ADD_IMAGE_DIFF_NOTE_ERROR} | ${[]} ${'updateStoreAfterAddImageDiffNote'} | ${updateStoreAfterAddImageDiffNote} | ${ADD_IMAGE_DIFF_NOTE_ERROR} | ${[]}
${'updateStoreAfterUploadDesign'} | ${updateStoreAfterUploadDesign} | ${UPLOAD_DESIGN_ERROR} | ${[]} ${'updateStoreAfterUploadDesign'} | ${updateStoreAfterUploadDesign} | ${mockErrors[0]} | ${[]}
${'updateStoreAfterUpdateImageDiffNote'} | ${updateStoreAfterUpdateImageDiffNote} | ${UPDATE_IMAGE_DIFF_NOTE_ERROR} | ${[]} ${'updateStoreAfterUpdateImageDiffNote'} | ${updateStoreAfterUpdateImageDiffNote} | ${UPDATE_IMAGE_DIFF_NOTE_ERROR} | ${[]}
`('$fnName handles errors in response', ({ subject, extraArgs, errorMessage }) => { `('$fnName handles errors in response', ({ subject, extraArgs, errorMessage }) => {
expect(createFlash).not.toHaveBeenCalled(); expect(createFlash).not.toHaveBeenCalled();
......
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