From 425e33b3d0b08dd76d5eed899bec776afaf01d84 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Mon, 30 Dec 2024 22:52:58 +0400 Subject: [PATCH] Use same ID for save notices --- packages/editor/src/store/utils/notice-builder.js | 4 ++-- packages/editor/src/store/utils/test/notice-builder.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/editor/src/store/utils/notice-builder.js b/packages/editor/src/store/utils/notice-builder.js index 5ec987a3458843..9e1230b2ea88c5 100644 --- a/packages/editor/src/store/utils/notice-builder.js +++ b/packages/editor/src/store/utils/notice-builder.js @@ -63,7 +63,7 @@ export function getNotificationArgumentsForSaveSuccess( data ) { return [ noticeMessage, { - id: 'editor-save-success', + id: 'editor-save', type: 'snackbar', actions, }, @@ -108,7 +108,7 @@ export function getNotificationArgumentsForSaveFail( data ) { return [ noticeMessage, { - id: 'editor-save-fail', + id: 'editor-save', }, ]; } diff --git a/packages/editor/src/store/utils/test/notice-builder.js b/packages/editor/src/store/utils/test/notice-builder.js index efc2926029fcc0..d97ec0f9f9483b 100644 --- a/packages/editor/src/store/utils/test/notice-builder.js +++ b/packages/editor/src/store/utils/test/notice-builder.js @@ -26,7 +26,7 @@ describe( 'getNotificationArgumentsForSaveSuccess()', () => { }; const post = { ...previousPost }; const defaultExpectedAction = { - id: 'editor-save-success', + id: 'editor-save', actions: [], type: 'snackbar', }; @@ -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`',