diff --git a/app/admin/dashboard.rb b/app/admin/dashboard.rb index 4105f2304..9db09a42e 100644 --- a/app/admin/dashboard.rb +++ b/app/admin/dashboard.rb @@ -4,7 +4,7 @@ ActiveAdmin.register_page "Dashboard" do content title: proc { I18n.t("active_admin.dashboard") } do columns do column do - panel "Recent Case Logs" do + panel "Recent logs" do table_for CaseLog.order(updated_at: :desc).limit(10) do column :id column :created_at @@ -17,13 +17,13 @@ ActiveAdmin.register_page "Dashboard" do end column do - panel "Total case logs in progress" do + panel "Total logs in progress" do para CaseLog.in_progress.size end - panel "Total case logs completed" do + panel "Total logs completed" do para CaseLog.completed.size end - panel "Total case logs completed" do + panel "Total logs completed" do pie_chart CaseLog.group(:status).size end end diff --git a/app/controllers/case_logs_controller.rb b/app/controllers/case_logs_controller.rb index 77ccc3d6d..59f91a6bf 100644 --- a/app/controllers/case_logs_controller.rb +++ b/app/controllers/case_logs_controller.rb @@ -31,7 +31,7 @@ class CaseLogsController < ApplicationController render json: { errors: @case_log.errors.messages }, status: :unprocessable_entity end else - render_not_found_json("Case log", params[:id]) + render_not_found_json("Log", params[:id]) end end @@ -43,7 +43,7 @@ class CaseLogsController < ApplicationController if @case_log render json: @case_log, status: :ok else - render_not_found_json("Case log", params[:id]) + render_not_found_json("Log", params[:id]) end end end @@ -67,7 +67,7 @@ class CaseLogsController < ApplicationController render json: { errors: @case_log.errors.messages }, status: :unprocessable_entity end else - render_not_found_json("Case log", params[:id]) + render_not_found_json("Log", params[:id]) end end diff --git a/app/views/case_logs/edit.html.erb b/app/views/case_logs/edit.html.erb index 775a25a1a..bb83d8370 100644 --- a/app/views/case_logs/edit.html.erb +++ b/app/views/case_logs/edit.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, "Case log #{@case_log.id}" %> +<% content_for :title, "Log #{@case_log.id}" %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
diff --git a/app/views/case_logs/index.html.erb b/app/views/case_logs/index.html.erb index 751ad9afe..56992cd13 100644 --- a/app/views/case_logs/index.html.erb +++ b/app/views/case_logs/index.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, "Case logs" %> +<% content_for :title, "Your logs" %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 90dae2d62..54da3536e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -39,7 +39,7 @@ if current_user.nil? component.navigation_item(text: 'Sign in', href: user_session_path) elsif - component.navigation_item(text: 'Case logs', href: case_logs_path) + component.navigation_item(text: 'Your logs', href: case_logs_path) component.navigation_item(text: 'Your organisation', href: "/organisations/#{current_user.organisation.id}") component.navigation_item(text: 'Your account', href: user_path(current_user)) component.navigation_item(text: 'Sign out', href: destroy_user_session_path, options: {:method => :delete}) diff --git a/spec/controllers/admin/case_logs_controller_spec.rb b/spec/controllers/admin/case_logs_controller_spec.rb index fc26bdb42..8c4d9a1e6 100644 --- a/spec/controllers/admin/case_logs_controller_spec.rb +++ b/spec/controllers/admin/case_logs_controller_spec.rb @@ -4,7 +4,7 @@ require_relative "../../support/devise" describe Admin::CaseLogsController, type: :controller do render_views let(:page) { Capybara::Node::Simple.new(response.body) } - let(:resource_title) { "Case Logs" } + let(:resource_title) { "Logs" } let(:valid_session) { {} } login_admin_user diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb index 7568babb3..6b9f6f808 100644 --- a/spec/controllers/admin/dashboard_controller_spec.rb +++ b/spec/controllers/admin/dashboard_controller_spec.rb @@ -21,18 +21,18 @@ describe Admin::DashboardController, type: :controller do end it "returns a panel of recent case logs" do - expect(page).to have_xpath("//div[contains(@class, 'panel') and contains(//h3, 'Recent Case Logs')]") + expect(page).to have_xpath("//div[contains(@class, 'panel') and contains(//h3, 'Recent logs')]") end it "returns a panel of in progress case logs" do - panel_xpath = "//div[@class='panel' and .//h3[contains(., 'Total case logs in progress')]]" + panel_xpath = "//div[@class='panel' and .//h3[contains(., 'Total logs in progress')]]" panel_content_xpath = "#{panel_xpath}//div[@class='panel_contents' and .//p[contains(., 2)]]" expect(page).to have_xpath(panel_xpath) expect(page).to have_xpath(panel_content_xpath) end it "returns a panel of completed case logs" do - panel_xpath = "//div[@class='panel' and .//h3[contains(., 'Total case logs completed')]]" + panel_xpath = "//div[@class='panel' and .//h3[contains(., 'Total logs completed')]]" panel_content_xpath = "#{panel_xpath}//div[@class='panel_contents' and .//p[contains(., 1)]]" expect(page).to have_xpath(panel_xpath) expect(page).to have_xpath(panel_content_xpath) diff --git a/spec/features/form/form_navigation_spec.rb b/spec/features/form/form_navigation_spec.rb index c06e29776..353497eb8 100644 --- a/spec/features/form/form_navigation_spec.rb +++ b/spec/features/form/form_navigation_spec.rb @@ -31,7 +31,7 @@ RSpec.describe "Form Navigation" do visit("/logs") click_link("Create new log") id = CaseLog.order(created_at: :desc).first.id - expect(page).to have_content("Case log #{id}") + expect(page).to have_content("Log #{id}") end end @@ -55,7 +55,7 @@ RSpec.describe "Form Navigation" do visit("/logs/#{id}") visit("/logs/#{id}/tenant-code") click_link(text: "Back") - expect(page).to have_content("Case log #{id}") + expect(page).to have_content("Log #{id}") end it "go back to tenant code page from tenant age page", js: true do diff --git a/spec/requests/case_log_controller_spec.rb b/spec/requests/case_log_controller_spec.rb index 85832d3d2..0dac4f9b3 100644 --- a/spec/requests/case_log_controller_spec.rb +++ b/spec/requests/case_log_controller_spec.rb @@ -195,7 +195,7 @@ RSpec.describe CaseLogsController, type: :request do end it "shows the tasklist for case logs you have access to" do - expect(response.body).to match("Case log") + expect(response.body).to match("Log") expect(response.body).to match(case_log.id.to_s) end