From f00b504f55268d69b62e2874dac6b237fcf879fd Mon Sep 17 00:00:00 2001 From: decabeza Date: Thu, 31 Jan 2019 17:06:22 +0100 Subject: [PATCH] Improve notice message for pages cards --- config/locales/en/admin.yml | 7 +++---- config/locales/es/admin.yml | 6 ++++++ spec/features/admin/widgets/cards_spec.rb | 8 ++++---- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index d0aac6442..c7ed2b140 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -1463,12 +1463,11 @@ en: link_url: Link URL columns_help: "Width of the card in number of columns. On mobile screens it's always a width of 100%." create: - notice: "Success" + notice: "Card created successfully!" update: - notice: "Updated" + notice: "Card updated successfully" destroy: - notice: "Removed" - + notice: "Card removed successfully" homepage: title: Homepage description: The active modules appear in the homepage in the same order as here. diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 4414fc939..9fef21495 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -1462,6 +1462,12 @@ es: link_text: Texto del enlace link_url: URL del enlace columns_help: "Ancho de la tarjeta en número de columnas. En pantallas móviles siempre es un ancho del 100%." + create: + notice: "¡Tarjeta creada con éxito!" + update: + notice: "Tarjeta actualizada con éxito" + destroy: + notice: "Tarjeta eliminada con éxito" homepage: title: Título description: Los módulos activos aparecerán en la homepage en el mismo orden que aquí. diff --git a/spec/features/admin/widgets/cards_spec.rb b/spec/features/admin/widgets/cards_spec.rb index 73924e35b..05f1a04f7 100644 --- a/spec/features/admin/widgets/cards_spec.rb +++ b/spec/features/admin/widgets/cards_spec.rb @@ -24,7 +24,7 @@ feature 'Cards' do attach_image_to_card click_button "Create card" - expect(page).to have_content "Success" + expect(page).to have_content "Card created successfully!" expect(page).to have_css(".homepage-card", count: 1) card = Widget::Card.last @@ -74,7 +74,7 @@ feature 'Cards' do fill_in "widget_card_link_url", with: "consul.dev updated" click_button "Save card" - expect(page).to have_content "Updated" + expect(page).to have_content "Card updated successfully" expect(page).to have_css(".homepage-card", count: 1) within("#widget_card_#{Widget::Card.last.id}") do @@ -97,7 +97,7 @@ feature 'Cards' do end end - expect(page).to have_content "Removed" + expect(page).to have_content "Card removed successfully" expect(page).to have_css(".homepage-card", count: 0) end @@ -114,7 +114,7 @@ feature 'Cards' do fill_in "widget_card_link_url", with: "consul.dev" click_button "Create header" - expect(page).to have_content "Success" + expect(page).to have_content "Card created successfully!" within("#header") do expect(page).to have_css(".homepage-card", count: 1)