Skip to content

Commit

Permalink
Use same ID for save notices
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Dec 30, 2024
1 parent 7e2de0d commit 425e33b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/store/utils/notice-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function getNotificationArgumentsForSaveSuccess( data ) {
return [
noticeMessage,
{
id: 'editor-save-success',
id: 'editor-save',
type: 'snackbar',
actions,
},
Expand Down Expand Up @@ -108,7 +108,7 @@ export function getNotificationArgumentsForSaveFail( data ) {
return [
noticeMessage,
{
id: 'editor-save-fail',
id: 'editor-save',
},
];
}
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/store/utils/test/notice-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe( 'getNotificationArgumentsForSaveSuccess()', () => {
};
const post = { ...previousPost };
const defaultExpectedAction = {
id: 'editor-save-success',
id: 'editor-save',
actions: [],
type: 'snackbar',
};
Expand Down Expand Up @@ -105,7 +105,7 @@ describe( 'getNotificationArgumentsForSaveFail()', () => {
const error = { code: '42', message: 'Something went wrong.' };
const post = { status: 'publish' };
const edits = { status: 'publish' };
const defaultExpectedAction = { id: 'editor-save-fail' };
const defaultExpectedAction = { id: 'editor-save' };
[
[
'when error code is `rest_autosave_no_changes`',
Expand Down

0 comments on commit 425e33b

Please sign in to comment.