From 43e69d1e88d732405a9e84408f30592227693bc2 Mon Sep 17 00:00:00 2001 From: bilal Date: Mon, 22 Jun 2020 19:22:23 +0200 Subject: [PATCH] change text and spec --- app/views/task_requests/create.html.erb | 2 +- config/locales/en.yml | 1 + config/locales/es.yml | 2 ++ spec/features/user_creates_task_request_spec.rb | 6 +++++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/task_requests/create.html.erb b/app/views/task_requests/create.html.erb index 3974af1..382bbe0 100644 --- a/app/views/task_requests/create.html.erb +++ b/app/views/task_requests/create.html.erb @@ -1,4 +1,4 @@ <% if params[:show_chat] %> <%= javascript_include_tag "https://js.hs-scripts.com/7344617.js", defer: "defer", async: true, id: "hs-script-loader" %> <% end %> -

Your task request was successfully submitted. Thank you.

+

<%= t '.success_message' %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 0ffbad0..ee67a04 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -943,6 +943,7 @@ en: notice: Task has been cancelled successfully. create: notice: Task request created succussfully. + success_message: Your task request was successfully submitted. Thank you. A chat window will pop up on the lower right in a few seconds. edit: heading: Edit Task Request diff --git a/config/locales/es.yml b/config/locales/es.yml index 58364f8..6f72b38 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -189,3 +189,5 @@ es: actions: manage: Manage (ES) open_deliverable: Open Deliverable (ES) + create: + success_message: Your task request was successfully submitted. Thank you. A chat window will pop up on the lower right in a few seconds. (ES) diff --git a/spec/features/user_creates_task_request_spec.rb b/spec/features/user_creates_task_request_spec.rb index b2540fe..2ecb847 100644 --- a/spec/features/user_creates_task_request_spec.rb +++ b/spec/features/user_creates_task_request_spec.rb @@ -20,7 +20,7 @@ RSpec.feature 'User creates task request', type: :feature do click_on 'Create Task request' - expect(page).to have_content('Task request created succussfully.') + expect(page).to have_content task_created_message end scenario 'user can view task request details' do @@ -85,4 +85,8 @@ RSpec.feature 'User creates task request', type: :feature do def additional_notes_field t "task_requests.form.labels.additional_notes" end + + def task_created_message + t 'task_requests.create.success_message' + end end \ No newline at end of file