Fix submit button text for Admin Notifications admin form

In Madrid, the button text didn't change depending on whether the form
is for the "new" page or for the "edit" page.

In consul, the buttons texts were "create admin notification" and
"update admin notification" instead of "create notification" and "update
notification".

Also change translation key from "submit" to "submit_button" to
match other instances.
This commit is contained in:
Marko Lovic
2018-08-01 14:36:17 +02:00
committed by Javi Martín
parent eeb7463ff4
commit 5ff85d33d6
5 changed files with 12 additions and 6 deletions

View File

@@ -75,7 +75,7 @@ feature "Admin Notifications" do
body: 'This is a body',
link: 'http://www.dummylink.dev')
click_button "Create Admin notification"
click_button "Create notification"
expect(page).to have_content "Notification created successfully"
expect(page).to have_content "Proposal authors"
@@ -99,7 +99,7 @@ feature "Admin Notifications" do
body: 'Other body',
link: '')
click_button "Update Admin notification"
click_button "Update notification"
expect(page).to have_content "Notification updated successfully"
expect(page).to have_content "All users"
@@ -171,7 +171,7 @@ feature "Admin Notifications" do
scenario 'Errors on create' do
visit new_admin_admin_notification_path
click_button "Create Admin notification"
click_button "Create notification"
expect(page).to have_content error_message
end
@@ -181,7 +181,7 @@ feature "Admin Notifications" do
visit edit_admin_admin_notification_path(notification)
fill_in :admin_notification_title, with: ''
click_button "Update Admin notification"
click_button "Update notification"
expect(page).to have_content error_message
end
@@ -228,7 +228,7 @@ feature "Admin Notifications" do
visit new_admin_admin_notification_path
fill_in_admin_notification_form(segment_recipient: segment_recipient)
click_button "Create Admin notification"
click_button "Create notification"
expect(page).to have_content(I18n.t("admin.segment_recipient.#{user_segment}"))
end