diff --git a/app/decorators/volunteer_decorator.rb b/app/decorators/volunteer_decorator.rb index 303b229fd9..d2b99d2586 100644 --- a/app/decorators/volunteer_decorator.rb +++ b/app/decorators/volunteer_decorator.rb @@ -3,9 +3,9 @@ class VolunteerDecorator < UserDecorator def cc_reminder_text if h.current_user.supervisor? - h.t("volunteers.send_reminder_button.supervisor_checkbox_text") + "Send CC to Supervisor" elsif h.current_user.casa_admin? - h.t("volunteers.send_reminder_button.admin_checkbox_text") + "Send CC to Supervisor and Admin" end end end diff --git a/app/models/case_contact.rb b/app/models/case_contact.rb index 4053e46473..d5de1b9571 100644 --- a/app/models/case_contact.rb +++ b/app/models/case_contact.rb @@ -205,24 +205,22 @@ def supervisor_active? end def self.options_for_sorted_by - sorted_by_params.map do |option| - [I18n.t("models.case_contact.options_for_sorted_by.#{option}"), option] - end + sorted_by_params.each.map { |option_pair| option_pair.reverse } end private_class_method def self.sorted_by_params - %i[ - occurred_at_asc - occurred_at_desc - contact_type_asc - contact_type_desc - medium_type_asc - medium_type_desc - want_driving_reimbursement_asc - want_driving_reimbursement_desc - contact_made_asc - contact_made_desc - ] + { + occurred_at_asc: "Date of contact (oldest first)", + occurred_at_desc: "Date of contact (newest first)", + contact_type_asc: "Contact type (A-z)", + contact_type_desc: "Contact type (z-A)", + medium_type_asc: "Contact medium (A-z)", + medium_type_desc: "Contact medium (z-A)", + want_driving_reimbursement_asc: "Want driving reimbursement ('no' first)", + want_driving_reimbursement_desc: "Want driving reimbursement ('yes' first)", + contact_made_asc: "Contact made ('no' first)", + contact_made_desc: "Contact made ('yes' first)" + } end end diff --git a/app/notifications/emancipation_checklist_reminder_notification.rb b/app/notifications/emancipation_checklist_reminder_notification.rb index c6d1644362..d0ed2c209f 100644 --- a/app/notifications/emancipation_checklist_reminder_notification.rb +++ b/app/notifications/emancipation_checklist_reminder_notification.rb @@ -18,11 +18,14 @@ class EmancipationChecklistReminderNotification < BaseNotification # Define helper methods to make rendering easier. def message - t(".message", case_number: params[:casa_case].case_number) + casa_case = params[:casa_case] + "Your case #{casa_case.case_number} is a transition aged youth. " \ + "We want to make sure that along the way, we’re preparing our youth for emancipation. " \ + "Make sure to check the emancipation checklist." end def title - t(".title") + "Emancipation Checklist Reminder" end def url diff --git a/app/views/devise/mailer/invitation_instructions.text.erb b/app/views/devise/mailer/invitation_instructions.text.erb index 4b7a4cd5e4..86a2f4b079 100644 --- a/app/views/devise/mailer/invitation_instructions.text.erb +++ b/app/views/devise/mailer/invitation_instructions.text.erb @@ -5,6 +5,6 @@ <% else %> A CASA console admin account has been created for you. Your console account is associated with this email. If you are ready to get started, please set your password. This is the first step to accessing your new account. - <%= t 'devise.mailer.invitation_instructions.accept_until', due_date: l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format') %> + <%= "This invitation will be due in #{I18n.l(@resource.invitation_due_at, format: :'devise.mailer.invitation_instructions.accept_until_format')}." %> <% end %> <%= link_to "Set your password", accept_invitation_url(@resource, invitation_token: @token) %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index c4f65a810e..3c640843ba 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,16 +1,16 @@ - <%= translate('page.meta.title') %> + CASA Volunteer Tracking - + <%= csrf_meta_tags %> <%= csp_meta_tag %> - <%= og_tag :title, content: translate('page.meta.title') %> - <%= og_tag :description, content: translate('page.meta.description') %> + <%= og_tag :title, content: "CASA Volunteer Tracking" %> + <%= og_tag :description, content: "Volunteer activity tracking for CASA volunteers, supervisors, and administrators." %> <%= og_tag :url, content: root_url %> <%= og_tag :image, content: image_url('login.jpg') %> diff --git a/config/locales/controllers.en.yml b/config/locales/controllers.en.yml deleted file mode 100644 index fe98938f21..0000000000 --- a/config/locales/controllers.en.yml +++ /dev/null @@ -1,6 +0,0 @@ -en: - case_court_reports: - generate: - error: - template_not_found: Template is not found - report_not_found: Report %{case_number} is not found. diff --git a/config/locales/en.yml b/config/locales/en.yml index db19604fdb..ae0e936e8c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -30,29 +30,6 @@ # available at https://guides.rubyonrails.org/i18n.html. en: - hello: "Hello world" - activerecord: - attributes: - learning_hour: - learning_hour_type: "Type of Learning" - pundit: - default: "Sorry, you are not authorized to perform this action." - casa_case_policy: - new?: "Sorry, you are not authorized to create CASA cases." - case_contact_policy: - edit?: "Sorry, you can only edit case contacts that you have logged." - update?: "Sorry, you can only edit case contacts that you have logged." - forms: - casa_admin: - mark_inactive_warning: "WARNING: Marking an admin inactive will make them unable to login. Are you sure you want to do this?" - supervisor: - mark_inactive_warning: "WARNING: Marking a supervisor inactive will make them unable to login. Are you sure you want to do this?" - volunteer: - mark_inactive_warning: "WARNING: Marking a volunteer inactive will make them unable to login. Are you sure you want to do this?" - page: - meta: - title: CASA Volunteer Tracking - description: Volunteer activity tracking for CASA volunteers, supervisors, and administrators. time: formats: day_and_date: "%A, %d-%b-%Y" @@ -62,69 +39,6 @@ en: youth_date_of_birth: "%B %Y" short_date: "%-m/%d" edit_profile: "%B %d, %Y at %I:%M %p %Z" - notifications: - emancipation_checklist_reminder_notification: - title: "Emancipation Checklist Reminder" - message: "Your case %{case_number} is a transition aged youth. We want to make sure that along the way, we’re preparing our youth for emancipation. Make sure to check the emancipation checklist." - followup_resolved_notification: - title: "Followup resolved" - message: "%{created_by_name} resolved a follow up. Click to see more." - followup_notification: - title: "New followup" - message: "%{created_by_name} has flagged a Case Contact that needs follow up." - note: "Note: \"%{note}\"" - more_info: "Click to see more." - youth_birthday_notification: - title: "Youth Birthday Notification" - message: "Your youth, case number: %{case_number} has a birthday next month." - button: - delete: Delete - undelete: undelete - edit: Edit - back: Back - submit: Submit - resolve: Resolve Reminder - follow_up: Make Reminder - go_back_to_form: Go Back to Form - continue_submitting: Continue Submitting - close: Close - detail_view: Detail View - common: - yes_text: "Yes" - no_text: "No" - both_text: Both - active: Active - inactive: Inactive - status: Status - day: Day - month: Month - year: Year - none: None - email: Email - name: Name - display_name: Display name - phone_number: Phone number - address: Address date: formats: full: "%B %-d, %Y" - case_contact: - create: Case contact was successfully created. - update: "Case contact created at %{created_at}, was successfully updated." - destroy: Contact is successfully deleted. - restore: Contact is successfully restored. - case_min_validation: At least one case must be selected - thank_you_1: Thanks for all you do! - thank_you_2: Thank you for your hard work! - thank_you_3: Thank you for a job well done! - thank_you_4: Thank you for volunteering! - thank_you_5: Thanks for being a great volunteer! - thank_you_6: One of the greatest gifts you can give is your time! - thank_you_7: Those who can do, do. Those who can do more, volunteer. - thank_you_8: Volunteers do not necessarily have the time, they just have the heart. - communication_preferences: - header: "Communication Preferences" - paragraph: "Tell us how you'd like to receive notifications." - email_me: "Email Me" - text_me: "Text Me" - save_preferences: "Save Preferences" diff --git a/config/locales/models.en.yml b/config/locales/models.en.yml deleted file mode 100644 index 3c1fe34725..0000000000 --- a/config/locales/models.en.yml +++ /dev/null @@ -1,14 +0,0 @@ -en: - models: - case_contact: - options_for_sorted_by: - occurred_at_asc: Date of contact (oldest first) - occurred_at_desc: Date of contact (newest first) - contact_type_asc: Contact type (A-z) - contact_type_desc: Contact type (z-A) - medium_type_asc: Contact medium (A-z) - medium_type_desc: Contact medium (z-A) - want_driving_reimbursement_asc: Want driving reimbursement ('no' first) - want_driving_reimbursement_desc: Want driving reimbursement ('yes' first) - contact_made_asc: Contact made ('no' first) - contact_made_desc: Contact made ('yes' first) diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml deleted file mode 100644 index 78681e090d..0000000000 --- a/config/locales/views.en.yml +++ /dev/null @@ -1,472 +0,0 @@ -en: - casa_cases: - edit: - title: Editing - filter: - pick_displayed_columns: Pick Displayed Columns - select_columns: Select columns - form: - button: - create: Create CASA Case - deactivate: Deactivate CASA Case - reactivate: Reactivate CASA Case - update: Update CASA Case - court_report_due_date: Court Report Due Date - court_date: Next Court Date - prompt: - deactivate: - confirm_swal: > - Deactivating a CASA Case will unassign any volunteers currently - assigned to this case. - - fail: No, go back - success: Yes, deactivate - youth_birth_month_year: "Youth's Birth Month & Year" - youth_date_in_care: "Youth's Date in Care" - case_number: Case number - court_details: Court Details - transition_aged_youth: Transition Aged Youth - court_report_status: Court Report Status - index: - button: - new: New Case - case: <%= "Case".pluralize(%{count}) %> - cases: Cases - heading: - actions: Actions - assigned_to: Assigned To - case_number: Case Number - hearing_type: Hearing Type - judge: Judge - status: Status - transition_aged_youth: Transition Aged Youth - own_case: My <%= "Case".pluralize(%{count}) %> - own_cases: My Cases - pick_displayed_columns: Pick displayed columns - new: - title: New CASA Case - court_dates: - add_court_date: Add a court date - court_dates: Court dates - label: - attached_report: Attached Report - no_court_dates: No Court Dates - shared: - assigned_multiple: Assigned to more than 1 Volunteer - assigned_single: Assigned to Volunteer - assigned_transition_aged_youth: Assigned to Transition Aged Youth - casa_case_prefix: Casa Case Prefix - filter_by: Filter by - prefix_options: - cina: CINA - none: None - tpr: TPR - show: - assigned_volunteers: Assigned Volunteers - label: - assigned_volunteers: Assigned Volunteers - attached_report: Attached Report - case_number: Case number - court_orders: Court Orders - court_report_due_date: Court Report Due Date - court_report_status: Court Report Status - court_report_submitted_date: Court Report Submitted Date - next_court_date: Next Court Date - transition_aged_youth: Transition Aged Youth - youth_date_in_care: "Youth's Date in Care" - button: - click_to_download: Click to download - download_all: Download All - edit_case: Edit Case Details - emancipation: Emancipation - generate_report: Generate Report - new_contact: New Case Contact - title: CASA Case Details - volunteer_assignment: - assign_new: Assign a New Volunteer - assigned_volunteers: Assigned Volunteers - assigned: Assigned - button: - activate: Activate Volunteer - assign: Assign Volunteer - unassign: Unassign Volunteer - deactivated_volunteer: Deactivated volunteer - heading: - actions: Actions - end_date: End Date - start_date: Start Date - status: Status - volunteer_email: Volunteer Email - volunteer_name: Volunteer Name - select_volunteer: Select a Volunteer - title: Manage Volunteers - unassigned: Unassigned - other_duties: - title: Other Duties - heading: - occurred_at: Duties Occurred - created_at: Created - duration: Duration - title: Title - button: - new_other_duty: New Duty - casa_admins: - edit: - title: Edit Casa Admin - form: - active: Active - active_text: Admin is - button: - activate: Activate Admin - deactivate: Deactivate - deactive_text: Admin was deactivated on - label: - display_name: Display name - prompt: - mark_inactive_warning: > - "WARNING: Marking an admin inactive will make them unable to login. - Are you sure you want to do this?" - index: - active: Active - active_text: Admin is - button: - edit: Edit - new: New Admin - deactivated: Deactivated - deactive_text: Admin was deactivated on - heading: - actions: Actions - admin_email: Admin Email - title: Admins - case_assignments: - index: - assign_new: Assign a New Case - button: - assign: Assign Case - unassign: Unassign Case - heading: - actions: Actions - case_number: Case Number - transition_aged_youth: Transition Aged Youth - select_case: Select a Case - title: Edit Volunteer Assignments for - case_contact: - created_by: Created by - deleted_text: "[DELETE] " - hide: Hide - read_more: Read more - confirm_note_content_dialog: - body: > - Please double check your notes to ensure they don't contain any - identifying details about your youth or anyone else. - header: Confirm Note Content - note: Note - edit: - title: Editing Case Contact - form: - contact_types_label: 2. Select All Contact Types - new: - title: New Case Contact - contact_types: - contact_types: Contact types - casa_org: - contact_type_groups: - button: - edit: Edit - new: New Group - heading: - actions: Actions - active: Active? - name: Name - title: Contact Type Groups - hearing_types: - button: - edit: Edit - new: New Hearing Type - heading: - actions: Actions - active: Active? - name: Name - title: Hearing Types - judges: - button: - edit: Edit - new: New Judge - heading: - actions: Actions - active: Active? - name: Name - title: Judge - sent_emails: - heading: - category: Category - created_at: Time Sent - mailer_type: Mailer Type - sent_address: Recipient - title: Sent Emails - case_court_reports: - index: - button: - download: Download Court Report - generate: Generate Report - description: > - "The Court Report is pre-filled with information for your case. - You can select among currently active cases - assigned to you. The document is in Microsoft Word format (.docx)." - generate_report: Generate Court Report - label: - case_number: "Case Number:" - prompt: - search_case_number: Search by volunteer name or case number - select_case_number: Select case number - title: Report Categories - contact_type_groups: - edit: - title: Edit Contact Type Group - contact_types: - new: - title: New Contact Type - edit: - title: Edit Contact Type - learning_hours: - index: - heading: - name: Title - type: Learning Type - occurred_at: Date - time: Time Spent - action: Action - title: Learning Hours - form: - learning_hours_title: Learning Hours Title - learning_hour_type_id: Type of Learning - duration: Learning Duration - occurred_on: Occurred On - create_button: Create New Learning Hours Entry - update_button: Edit Learning Hours Entry - confirm_note_content_dialog: - header: Congratulations - body: New entry created - global: - add_court_order: Add a court order - court_orders: > - Court Orders - Please check that you didn't enter any youth names - email: Email - judges: - edit: - title: Edit Judge - new: - title: New Judge - form: - active: Active - layouts: - application: - javascript_instrucion: - enable: Please enable javascript - require: This app requires javascript to work - footers: - logged_in: - built_by: Built by - link: - report_site_issue: Report a site issue - sms_terms_and_conditions: SMS Terms & Conditions - ruby_for_good: Ruby For Good - not_logged_in: - built_by: Built by - link: - report_site_issue: Report a site issue - sms_terms_and_conditions: SMS Terms & Conditions - ruby_for_good: Ruby For Good - login_header: - image: - logo: - alt: CASA Logo - mobile_navbar: - button: - menu: Menu - sidebar: - footer: - location: Location - role: Role - image: - alt: - logo: CASA Logo - link: - edit_organization: Edit Organization - edit_profile: Edit Profile - export_data: Export Data - generate_court_reports: Generate Court Reports - reimbursement_queue: Reimbursement Queue - report_site_issue: Report a site issue - system_imports: System Imports - mileage_rate: Mileage Rates - menu_item: - admins: Admins - case_contacts: Case Contacts - emancipation_checklists: Emancipation Checklist(s) - learning_hours: Learning Hours - other_duties: Other Duties - supervisors: Supervisors - volunteers: Volunteers - notifications: - index: - no_notifications: > - You currently don't have any notifications. Notifications are generated - when someone requests follow-up on a case contact. - reimbursements: - data_table: - heading: - amount: Amount - case_number: Case Number - contact_types: Contact Types - date_added: Date Added - description: Description - occurred_at: Occurred At - expense_type: Expense Type - reimbursement_complete: Reimbursement Complete - volunteer: Volunteer - filters: - title: Filter By - occurred_at_filter_end_label: Ending at - occurred_at_filter_start_label: Starting from - occurred_at_filter_title: Occurred at - volunteer_filter_title: Volunteer - table: - heading: - amount: Miles Driven - case_number: Case Number - contact_types: Contact Types - date_added: Date Added - description: Description - occurred_at: Occurred At - expense_type: Expense Type - reimbursement_complete: Reimbursement Complete - volunteer: Volunteer - reports: - index: - assigned_to_label: "Assigned To" - contact_made_label: "Contact Made" - contact_type_group_label: "Contact Type Group" - contact_type_label: "Contact Type" - download_mileage_report_button: - enabled: Mileage Report - disabled: Downloading Mileage Report - download_missing_data_report_button: "Missing Data Report" - download_learning_hours_report_button: "Learning Hours Report" - download_report_button: Download Report - driving_reimbursement_label: "Want Driving Reimbursement" - end_date_label: "Ending At" - export_page_title: Export Data - filter_cols: Filter Columns - reports_subhead: Case Contacts Report - reports_description: > - This CSV is a listing of all fields for the case contacts of all - volunteers. Select the start and end date. - select_contact_type_groups_placeholder: -Select Contact Type Groups- - select_contact_types_placeholder: -Select Contact Types- - select_supervisors_placeholder: -Select Supervisors- - select_volunteers_placeholder: -Select Volunteers- - start_date_label: "Starting From" - transition_aged_label: "Transition Aged Youth" - volunteers_label: Volunteers - filter: - filter_exported_columns: Filter Exported Columns - select_columns: "Select columns:" - supervisors: - index: - active: Active - both: Both - filter: Filter by - inactive: Inactive - status: Status - edit: - assign_a_volunteer: Assign a Volunteer - assign_volunteer: Assign Volunteer - currently_assigned_to: Currently Assigned To - hide_unassigned: Hide unassigned - include_unassigned: Include unassigned - manage_volunteers: Manage Volunteers - no_volunteers_available: > - There are no active, unassigned volunteers available. - select_a_volunteer: Select a Volunteer - title: Editing Supervisor - unassign: Unassign - unassigned: Unassigned - volunteer_email: Volunteer Email - volunteer_name: Volunteer Name - volunteer_title: - one: All Volunteers - other: All Volunteers - zero: Assigned Volunteers - volunteers: - edit: - notes_placeholder: > - "Enter a note regarding the volunteer. These notes are only visible - to CASA administrators and supervisors." - note_submit: "Save Note" - index: - active: Active - button: - new: New Volunteer - filter: Filter by - heading: - actions: Actions - assigned_transition_aged_youth: Assigned To Transition Aged Youth - case_number: Case Number(s) - contacts: Contacts Made in Past 60 Days - e_mail: Email - last_attempted_contact: Last Attempted Contact - hours_spent_in: Hours spent in last 30 days - name: Name - supervisor: Supervisor - status: Status - inactive: Inactive - no_supervisor: No supervisor assignment - "no": No - pick_displayed_columns: Pick displayed columns - select_columns: Select columns - supervisor: Supervisor - status: Status - transition_aged_youth: Assigned to Transition Aged Youth - volunteers: Volunteers - "yes": Yes - send_reminder_button: - admin_checkbox_text: Send CC to Supervisor and Admin - send_reminder: Send Reminder - supervisor_checkbox_text: Send CC to Supervisor - tooltip: Remind volunteer to input case contacts - - notes: - update: Update Note - mileage_rates: - index: - mileage_rates: Mileage Rates - button: - new: New Mileage Rate - edit: Edit - pick_displayed_columns: Pick displayed columns - heading: - amount: Amount - effective_date: Effective date - status: Active? - created_by: Created By - created_at: Created At - actions: Actions - form: - effective_date: Effective date - amount: Amount - is_active: Currently active? - users: - edit: - email: Email - display_name: Display name - other_duties: - new: - title: New Duty - edit: - title: Editing Duty - form: - occurred_on: Occurred On - duration_meeting: Duty Duration - enter_notes: Enter Notes - enter_notes_placeholder: Enter notes here diff --git a/spec/helpers/report_helper_spec.rb b/spec/helpers/report_helper_spec.rb index 69315fe476..ccfa02dd43 100644 --- a/spec/helpers/report_helper_spec.rb +++ b/spec/helpers/report_helper_spec.rb @@ -3,7 +3,7 @@ RSpec.describe ReportHelper do describe "#boolean_choices" do it "returns array with correct options" do - expect(helper.boolean_choices).to eq [[I18n.t(".common.both_text"), ""], [I18n.t(".common.yes_text"), true], [I18n.t(".common.no_text"), false]] + expect(helper.boolean_choices).to eq [["Both", ""], ["Yes", true], ["No", false]] end end end diff --git a/spec/notifications/emancipation_checklist_reminder_notification_spec.rb b/spec/notifications/emancipation_checklist_reminder_notification_spec.rb new file mode 100644 index 0000000000..87bbc15f35 --- /dev/null +++ b/spec/notifications/emancipation_checklist_reminder_notification_spec.rb @@ -0,0 +1,21 @@ +require "rails_helper" + +RSpec.describe EmancipationChecklistReminderNotification, type: :model do + let(:casa_case) { create :casa_case } + + let(:notification) { EmancipationChecklistReminderNotification.with(casa_case: casa_case) } + + describe "message" do + it "contains the case number" do + case_number = casa_case.case_number + expect(notification.message).to include case_number + end + end + + describe "url" do + it "contains the case id" do + case_id = casa_case.id.to_s + expect(notification.url).to include case_id + end + end +end diff --git a/spec/system/learning_hours/new_spec.rb b/spec/system/learning_hours/new_spec.rb index 6c8afbde65..e2765dbf99 100644 --- a/spec/system/learning_hours/new_spec.rb +++ b/spec/system/learning_hours/new_spec.rb @@ -18,7 +18,7 @@ fill_in "Minute(s)", with: "30" click_on "Create New Learning Hours Entry" - expect(page).to have_text("Type of Learning must exist") + expect(page).to have_text("Learning hour type must exist") end it "creates learning hours entry with valid data" do diff --git a/spec/system/notifications/index_spec.rb b/spec/system/notifications/index_spec.rb index 2a8b292460..c847596187 100644 --- a/spec/system/notifications/index_spec.rb +++ b/spec/system/notifications/index_spec.rb @@ -25,12 +25,12 @@ expect(page).to have_text(notification_message) expect(page).to have_text("Followup resolved") - expect(page).not_to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).not_to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") end context "when volunteer changes its name" do let(:created_by_name) { "Foo bar" } - let(:new_notification_message) { I18n.t("notifications.followup_resolved_notification.message", created_by_name: created_by_name) } + let(:new_notification_message) { "#{created_by_name} resolved a follow up. Click to see more." } it "lists notifications showing it's current name" do visit edit_users_path @@ -43,7 +43,7 @@ expect(page).to have_text(new_notification_message) expect(page).not_to have_text(notification_message) - expect(page).not_to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).not_to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") end end end @@ -80,7 +80,7 @@ expect(page).to have_text(notification_message_heading) expect(page).to have_text(note) expect(page).to have_text(notification_message_more_info) - expect(page).not_to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).not_to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") expect(page).to have_text("New followup") end end @@ -100,14 +100,14 @@ visit notifications_path expect(page).to have_text(inline_notification_message) - expect(page).not_to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).not_to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") expect(page).to have_text("New followup") end end context "when admin changes its name" do let(:created_by_name) { "Foo bar" } - let(:new_notification_message) { I18n.t("notifications.followup_notification.message", created_by_name: created_by_name) } + let(:new_notification_message) { "#{created_by_name} has flagged a Case Contact that needs follow up." } before do click_button "Make Reminder" @@ -130,7 +130,7 @@ expect(page).to have_text(new_notification_message) expect(page).not_to have_text(inline_notification_message) - expect(page).not_to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).not_to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") expect(page).to have_text("New followup") end end @@ -145,7 +145,7 @@ it "should display a notification reminder that links to the emancipation checklist" do notification_message = "Your case #{casa_case.case_number} is a transition aged youth. We want to make sure that along the way, we’re preparing our youth for emancipation. Make sure to check the emancipation checklist." - expect(page).not_to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).not_to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") expect(page).to have_content("Emancipation Checklist Reminder") expect(page).to have_link(notification_message, href: casa_case_emancipation_path(casa_case.id)) end @@ -160,7 +160,7 @@ it "should display a notification on the notifications page" do notification_message = "Your youth, case number: #{casa_case.case_number} has a birthday next month." - expect(page).not_to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).not_to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") expect(page).to have_content("Youth Birthday Notification") expect(page).to have_link(notification_message, href: casa_case_path(casa_case.id)) end @@ -175,7 +175,7 @@ notification_message = "Volunteer #{case_contact.creator.display_name}'s request for reimbursement for " \ "#{case_contact.miles_driven}mi on #{case_contact.occurred_at_display} has been processed and is " \ "en route." - expect(page).not_to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).not_to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") expect(page).to have_content("Reimbursement Approved") expect(page).to have_content(notification_message) expect(page).to have_link(href: case_contacts_path(casa_case_id: casa_case.id)) @@ -187,7 +187,7 @@ sign_in volunteer visit notifications_path - expect(page).to have_text(I18n.t(".notifications.index.no_notifications")) + expect(page).to have_text("You currently don't have any notifications. Notifications are generated when someone requests follow-up on a case contact.") end end end diff --git a/spec/system/reports/index_spec.rb b/spec/system/reports/index_spec.rb index 06a4e31950..3fe1b1a788 100644 --- a/spec/system/reports/index_spec.rb +++ b/spec/system/reports/index_spec.rb @@ -8,7 +8,7 @@ sign_in user visit reports_path - expect(page).to_not have_text I18n.t("reports.index.reports_subhead") + expect(page).to_not have_text "Case Contacts Report" expect(page).to have_text "Sorry, you are not authorized to perform this action." end end @@ -20,19 +20,19 @@ sign_in user visit reports_path - expect(page).to have_text I18n.t("reports.index.reports_subhead") + expect(page).to have_text "Case Contacts Report" expect(page).to have_text I18n.l(6.months.ago.to_date, format: :day_and_date, default: "") expect(page).to have_text I18n.l(Date.today.to_date, format: :day_and_date, default: "") - expect(page).to have_text I18n.t("reports.index.assigned_to_label") - expect(page).to have_text I18n.t("reports.index.volunteers_label") - expect(page).to have_text I18n.t("reports.index.contact_type_label") - expect(page).to have_text I18n.t("reports.index.contact_type_group_label") - expect(page).to have_text I18n.t("reports.index.driving_reimbursement_label") - expect(page).to have_text I18n.t("reports.index.contact_made_label") - expect(page).to have_text I18n.t("reports.index.transition_aged_label") - expect(page).to have_field(I18n.t("common.both_text"), count: 3) - expect(page).to have_field(I18n.t("common.yes_text"), count: 3) - expect(page).to have_field(I18n.t("common.no_text"), count: 3) + expect(page).to have_text "Assigned To" + expect(page).to have_text "Volunteers" + expect(page).to have_text "Contact Type" + expect(page).to have_text "Contact Type Group" + expect(page).to have_text "Want Driving Reimbursement" + expect(page).to have_text "Contact Made" + expect(page).to have_text "Transition Aged Youth" + expect(page).to have_field("Both", count: 3) + expect(page).to have_field("Yes", count: 3) + expect(page).to have_field("No", count: 3) end it "downloads report", js: true do @@ -41,7 +41,7 @@ sign_in user visit reports_path - click_on I18n.t("reports.index.download_report_button") + click_on "Download Report" expect(page).to have_text("Downloading Report") end end @@ -53,19 +53,19 @@ sign_in user visit reports_path - expect(page).to have_text I18n.t("reports.index.reports_subhead") + expect(page).to have_text "Case Contacts Report" expect(page).to have_text I18n.l(6.months.ago.to_date, format: :day_and_date, default: "") expect(page).to have_text I18n.l(Date.today.to_date, format: :day_and_date, default: "") - expect(page).to have_text I18n.t("reports.index.assigned_to_label") - expect(page).to have_text I18n.t("reports.index.volunteers_label") - expect(page).to have_text I18n.t("reports.index.contact_type_label") - expect(page).to have_text I18n.t("reports.index.contact_type_group_label") - expect(page).to have_text I18n.t("reports.index.driving_reimbursement_label") - expect(page).to have_text I18n.t("reports.index.contact_made_label") - expect(page).to have_text I18n.t("reports.index.transition_aged_label") - expect(page).to have_field(I18n.t("common.both_text"), count: 3) - expect(page).to have_field(I18n.t("common.yes_text"), count: 3) - expect(page).to have_field(I18n.t("common.no_text"), count: 3) + expect(page).to have_text "Assigned To" + expect(page).to have_text "Volunteers" + expect(page).to have_text "Contact Type" + expect(page).to have_text "Contact Type Group" + expect(page).to have_text "Want Driving Reimbursement" + expect(page).to have_text "Contact Made" + expect(page).to have_text "Transition Aged Youth" + expect(page).to have_field("Both", count: 3) + expect(page).to have_field("Yes", count: 3) + expect(page).to have_field("No", count: 3) end it "downloads report", js: true do @@ -74,7 +74,7 @@ sign_in user visit reports_path - click_on I18n.t("reports.index.download_report_button") + click_on "Download Report" expect(page).to have_text("Downloading Report") end end