From 35e21dbf37c86854bc028c410fd4e65b1c346506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Louv-Jansen?= Date: Tue, 20 Oct 2020 16:20:30 +0200 Subject: [PATCH] [Alerting] Improve toast when alert is created (#80327) --- .../public/application/sections/alert_form/alert_add.tsx | 2 +- .../functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.tsx index 84726bc950ef2..7be7e60c2e19c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.tsx @@ -134,7 +134,7 @@ export const AlertAdd = ({ const newAlert = await createAlert({ http, alert }); toastNotifications.addSuccess( i18n.translate('xpack.triggersActionsUI.sections.alertAdd.saveSuccessNotificationText', { - defaultMessage: "Saved '{alertName}'", + defaultMessage: 'Created alert "{alertName}"', values: { alertName: newAlert.name, }, diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index 4a9ead9b02006..ce821b56d3a8a 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -110,7 +110,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.click('saveAlertButton'); const toastTitle = await pageObjects.common.closeToast(); - expect(toastTitle).to.eql(`Saved '${alertName}'`); + expect(toastTitle).to.eql(`Created alert "${alertName}"`); await pageObjects.triggersActionsUI.searchAlerts(alertName); const searchResultsAfterSave = await pageObjects.triggersActionsUI.getAlertsList(); expect(searchResultsAfterSave).to.eql([ @@ -143,7 +143,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await testSubjects.missingOrFail('confirmAlertSaveModal'); const toastTitle = await pageObjects.common.closeToast(); - expect(toastTitle).to.eql(`Saved '${alertName}'`); + expect(toastTitle).to.eql(`Created alert "${alertName}"`); await pageObjects.triggersActionsUI.searchAlerts(alertName); const searchResultsAfterSave = await pageObjects.triggersActionsUI.getAlertsList(); expect(searchResultsAfterSave).to.eql([