Browse Source

CLDC-3604 View logs outcomes (#2618)

* Update view logs outcomes link

* Add logs outcomes page

* Set logs outcome before merge and on merge fail

* Update logs outcomes text

* Update line break
pull/2620/head
kosiakkatrina 2 years ago
parent
commit
7b38c408e5
  1. 10
      app/controllers/merge_requests_controller.rb
  2. 82
      app/helpers/merge_requests_helper.rb
  3. 2
      app/jobs/process_merge_request_job.rb
  4. 42
      app/models/merge_request.rb
  5. 27
      app/views/merge_requests/logs_outcomes.html.erb
  6. 1
      config/routes.rb
  7. 111
      spec/helpers/merge_requests_helper_spec.rb
  8. 8
      spec/jobs/process_merge_request_job_spec.rb
  9. 57
      spec/requests/merge_requests_controller_spec.rb

10
app/controllers/merge_requests_controller.rb

@ -12,6 +12,7 @@ class MergeRequestsController < ApplicationController
def user_outcomes; end
def relationship_outcomes; end
def scheme_outcomes; end
def logs_outcomes; end
def create
ActiveRecord::Base.transaction do
@ -66,14 +67,7 @@ class MergeRequestsController < ApplicationController
def start_merge
if @merge_request.status == "ready_to_merge"
@merge_request.update!(
processing: true,
last_failed_attempt: nil,
total_users: @merge_request.total_visible_users_after_merge,
total_schemes: @merge_request.total_visible_schemes_after_merge,
total_stock_owners: @merge_request.total_stock_owners_after_merge,
total_managing_agents: @merge_request.total_managing_agents_after_merge,
)
@merge_request.start_merge!
ProcessMergeRequestJob.perform_later(merge_request: @merge_request)
end

82
app/helpers/merge_requests_helper.rb

@ -27,7 +27,7 @@ module MergeRequestsHelper
[
{ label: "Total users after merge", value: display_value_or_placeholder(merge_request.total_users_label), action: merge_outcome_action(merge_request, "user_outcomes") },
{ label: "Total schemes after merge", value: display_value_or_placeholder(merge_request.total_schemes_label), action: merge_outcome_action(merge_request, "scheme_outcomes") },
{ label: "Total logs after merge", value: merge_request.total_lettings_logs.present? || merge_request.total_sales_logs.present? ? "#{merge_request.total_lettings_logs} lettings logs<br>#{merge_request.total_sales_logs} sales logs".html_safe : display_value_or_placeholder(nil), action: { text: "View", href: "#", visually_hidden_text: "total logs after merge" } },
{ label: "Total logs after merge", value: display_value_or_placeholder(merge_request.total_logs_label), action: merge_outcome_action(merge_request, "logs_outcomes") },
{ label: "Total stock owners & managing agents after merge", value: display_value_or_placeholder(merge_request.total_stock_owners_managing_agents_label), action: merge_outcome_action(merge_request, "relationship_outcomes") },
]
end
@ -196,4 +196,84 @@ module MergeRequestsHelper
count = merge_request.total_visible_schemes_after_merge
"#{"#{count} scheme".pluralize(count)} after merge"
end
def total_lettings_logs_after_merge_text(merge_request)
count = merge_request.total_visible_lettings_logs_after_merge
"#{"#{count} lettings log".pluralize(count)} after merge"
end
def total_sales_logs_after_merge_text(merge_request)
count = merge_request.total_visible_sales_logs_after_merge
"#{"#{count} sales log".pluralize(count)} after merge"
end
def merging_organisations_lettings_logs_outcomes_text(merge_request)
merging_organisations_logs_outcomes_text(merge_request, "lettings")
end
def merging_organisations_sales_logs_outcomes_text(merge_request)
merging_organisations_logs_outcomes_text(merge_request, "sales")
end
def merging_organisations_logs_outcomes_text(merge_request, type)
text = ""
if any_organisations_have_logs?(merge_request.merging_organisations, type)
managed_or_reported = type == "lettings" ? "managed" : "reported"
merging_organisations = merge_request.merging_organisations.count == 1 ? "merging organisation" : "merging organisations"
text += "#{merge_request.absorbing_organisation.name} users will have access to all #{type} logs owned or #{managed_or_reported} by the #{merging_organisations} after the merge.<br><br>"
if any_organisations_have_logs_after_merge_date?(merge_request.merging_organisations, type, merge_request.merge_date)
startdate = type == "lettings" ? "tenancy start date" : "sale completion date"
text += "#{type.capitalize} logs that are owned or #{managed_or_reported} by the #{merging_organisations} and have a #{startdate} after the merge date will have their owning or managing organisation changed to #{merge_request.absorbing_organisation.name}.<br><br>"
end
if any_organisations_share_logs?(merge_request.merging_organisations, type)
text += "Some logs are owned and #{managed_or_reported} by different organisations in this merge. They appear in the list for both the owning and the managing organisation.<br><br>"
end
end
organisations_without_logs, organisations_with_logs = merge_request.merging_organisations.partition { |organisation| organisation.send("#{type}_logs").count.zero? }
if merge_request.absorbing_organisation.send("#{type}_logs").count.zero?
organisations_without_logs = [merge_request.absorbing_organisation] + organisations_without_logs
else
organisations_with_logs = [merge_request.absorbing_organisation] + organisations_with_logs
end
if organisations_without_logs.any?
text += "#{organisations_without_logs.map(&:name).to_sentence} #{organisations_without_logs.count == 1 ? 'has' : 'have'} no #{type} logs.<br><br>"
end
organisations_with_logs.each do |organisation|
text += "#{link_to_merging_organisation_logs(organisation, type)}<br><br>"
end
text.html_safe
end
def link_to_merging_organisation_logs(organisation, type)
count_text = organisation.send("#{type}_logs").count == 1 ? "1 #{organisation.name} #{type} log" : "all #{organisation.send("#{type}_logs").count} #{organisation.name} #{type} logs"
govuk_link_to "View #{count_text} (opens in a new tab)", send("#{type}_logs_organisation_path", organisation), target: "_blank"
end
def lettings_logs_outcomes_header_text(merge_request)
count = merge_request.total_visible_lettings_logs_after_merge
"#{count} #{'lettings log'.pluralize(count)} after merge"
end
def sales_logs_outcomes_header_text(merge_request)
count = merge_request.total_visible_sales_logs_after_merge
"#{count} #{'sales log'.pluralize(count)} after merge"
end
def any_organisations_have_logs?(organisations, type)
organisations.any? { |organisation| organisation.send("#{type}_logs").count.positive? }
end
def any_organisations_have_logs_after_merge_date?(organisations, type, merge_date)
organisations.any? { |organisation| organisation.send("#{type}_logs").after_date(merge_date).exists? }
end
def any_organisations_share_logs?(organisations, type)
organisations.any? { |organisation| organisation.send("#{type}_logs").filter_by_managing_organisation(organisations.where.not(id: organisation.id)).exists? }
end
end

2
app/jobs/process_merge_request_job.rb

@ -10,6 +10,6 @@ class ProcessMergeRequestJob < ApplicationJob
Merge::MergeOrganisationsService.new(absorbing_organisation_id:, merging_organisation_ids:, merge_date:, absorbing_organisation_active_from_merge_date:).call
merge_request.update!(request_merged: true, last_failed_attempt: nil)
rescue StandardError
merge_request.update!(last_failed_attempt: Time.zone.now, processing: false, total_users: nil, total_schemes: nil)
merge_request.set_back_to_ready_to_merge!
end
end

42
app/models/merge_request.rb

@ -144,4 +144,46 @@ class MergeRequest < ApplicationRecord
"#{stock_owners_count} #{'stock owner'.pluralize(stock_owners_count)}\n#{managing_agents_count} #{'managing agent'.pluralize(managing_agents_count)}"
end
def total_visible_sales_logs_after_merge
return total_sales_logs if status == STATUS[:request_merged] || status == STATUS[:processing]
(absorbing_organisation.sales_logs.visible.pluck(:id) + merging_organisations.map { |org| org.sales_logs.visible.pluck(:id) }.flatten).uniq.count
end
def total_visible_lettings_logs_after_merge
return total_lettings_logs if status == STATUS[:request_merged] || status == STATUS[:processing]
(absorbing_organisation.lettings_logs.visible.pluck(:id) + merging_organisations.map { |org| org.lettings_logs.visible.pluck(:id) }.flatten).uniq.count
end
def total_logs_label
"#{total_visible_lettings_logs_after_merge} lettings logs<br>#{total_visible_sales_logs_after_merge} sales logs"
end
def start_merge!
update!(
processing: true,
last_failed_attempt: nil,
total_users: total_visible_users_after_merge,
total_schemes: total_visible_schemes_after_merge,
total_stock_owners: total_stock_owners_after_merge,
total_managing_agents: total_managing_agents_after_merge,
total_lettings_logs: total_visible_lettings_logs_after_merge,
total_sales_logs: total_visible_sales_logs_after_merge,
)
end
def set_back_to_ready_to_merge!
update!(
last_failed_attempt: Time.zone.now,
processing: false,
total_users: nil,
total_schemes: nil,
total_stock_owners: nil,
total_managing_agents: nil,
total_lettings_logs: nil,
total_sales_logs: nil,
)
end
end

27
app/views/merge_requests/logs_outcomes.html.erb

@ -0,0 +1,27 @@
<% content_for :before_content do %>
<% title = "Users" %>
<% content_for :title, title %>
<%= govuk_back_link href: merge_request_path(@merge_request) %>
<% end %>
<h1 class="govuk-heading-l">
<span class="govuk-caption-l"><%= @merge_request.absorbing_organisation_name %></span>
Logs
</h1>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<% unless @merge_request.status == "request_merged" || @merge_request.status == "processing" %>
<h2 class="govuk-heading-m"><%= total_lettings_logs_after_merge_text(@merge_request) %></h2>
<p class="govuk-body">
<%= merging_organisations_lettings_logs_outcomes_text(@merge_request) %>
</p>
<hr class="govuk-section-break govuk-section-break--m govuk-section-break--visible govuk-!-margin-bottom-7 govuk-!-width-three-quarters ">
<h2 class="govuk-heading-m"><%= total_sales_logs_after_merge_text(@merge_request) %></h2>
<p class="govuk-body">
<%= merging_organisations_sales_logs_outcomes_text(@merge_request) %>
</p>
<% end %>
</div>
</div>

1
config/routes.rb

@ -214,6 +214,7 @@ Rails.application.routes.draw do
get "user-outcomes"
get "relationship-outcomes"
get "scheme-outcomes"
get "logs-outcomes"
get "delete-confirmation", to: "merge_requests#delete_confirmation"
delete "delete", to: "merge_requests#delete"
patch "start-merge", to: "merge_requests#start_merge"

111
spec/helpers/merge_requests_helper_spec.rb

@ -158,4 +158,115 @@ RSpec.describe MergeRequestsHelper do
end
end
end
describe "logs outcomes summary" do
let(:organisation) { create(:organisation, name: "Org 1") }
let(:merging_organisation) { create(:organisation, name: "Org 2") }
let(:merging_organisation_2) { create(:organisation, name: "Org 3") }
let(:merge_request) { create(:merge_request, absorbing_organisation: organisation, merge_date: Time.zone.today) }
before do
create(:merge_request_organisation, merge_request:, merging_organisation:)
end
context "when merging organisations don't have logs" do
it "returns the correct merging_organisations_lettings_logs_outcomes_text text" do
outcome_text = merging_organisations_lettings_logs_outcomes_text(merge_request)
expect(outcome_text).not_to include("Org 1 users will have access to all lettings logs owned or managed by the merging organisation after the merge.")
expect(outcome_text).not_to include("Lettings logs that are owned or managed by the merging organisation and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_to include("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).to include("Org 1 and Org 2 have no lettings logs.")
end
it "returns correct lettings_logs_outcomes_header_text" do
expect(lettings_logs_outcomes_header_text(merge_request)).to eq("0 lettings logs after merge")
end
it "returns the correct merging_organisations_sales_logs_outcomes_text text" do
outcome_text = merging_organisations_sales_logs_outcomes_text(merge_request)
expect(outcome_text).not_to include("Org 1 users will have access to all sales logs owned or reported by the merging organisation after the merge.")
expect(outcome_text).not_to include("Sales logs that are owned or reported by the merging organisation and have a sale completion date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_to include("Some logs are owned and reported by different organisation in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).to include("Org 1 and Org 2 have no sales logs.")
end
it "returns correct sales_logs_outcomes_header_text" do
expect(sales_logs_outcomes_header_text(merge_request)).to eq("0 sales logs after merge")
end
end
context "when merging organisations have logs" do
before do
create(:lettings_log, owning_organisation: organisation)
create(:lettings_log, owning_organisation: merging_organisation, startdate: Time.zone.tomorrow)
create(:lettings_log, owning_organisation: merging_organisation, startdate: Time.zone.yesterday)
create(:sales_log, owning_organisation: organisation)
create(:sales_log, owning_organisation: merging_organisation, saledate: Time.zone.tomorrow)
create(:sales_log, owning_organisation: merging_organisation, saledate: Time.zone.yesterday)
end
it "returns the correct merging_organisations_lettings_logs_outcomes_text text" do
outcome_text = merging_organisations_lettings_logs_outcomes_text(merge_request)
expect(outcome_text).to include("Org 1 users will have access to all lettings logs owned or managed by the merging organisation after the merge.")
expect(outcome_text).to include("Lettings logs that are owned or managed by the merging organisation and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_to include("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_to include("Org 2 has no lettings logs.")
expect(outcome_text).to include("View all 2 Org 2 lettings logs (opens in a new tab)")
end
it "returns correct lettings_logs_outcomes_header_text" do
expect(lettings_logs_outcomes_header_text(merge_request)).to eq("3 lettings logs after merge")
end
it "returns the correct merging_organisations_sales_logs_outcomes_text text" do
outcome_text = merging_organisations_sales_logs_outcomes_text(merge_request)
expect(outcome_text).to include("Org 1 users will have access to all sales logs owned or reported by the merging organisation after the merge.")
expect(outcome_text).to include("Sales logs that are owned or reported by the merging organisation and have a sale completion date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).not_to include("Some logs are owned and reported by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_to include("Org 2 has no sales logs.")
expect(outcome_text).to include("View all 2 Org 2 sales logs (opens in a new tab)")
end
it "returns correct sales_logs_outcomes_header_text" do
expect(sales_logs_outcomes_header_text(merge_request)).to eq("3 sales logs after merge")
end
context "when logs are owned and managed by organisations in the same merge" do
before do
create(:organisation_relationship, parent_organisation: merging_organisation_2, child_organisation: merging_organisation)
create(:merge_request_organisation, merge_request:, merging_organisation: merging_organisation_2)
create(:lettings_log, assigned_to: merging_organisation_2.users.first, owning_organisation: merging_organisation_2, managing_organisation: merging_organisation, startdate: Time.zone.yesterday)
create(:sales_log, assigned_to: merging_organisation_2.users.first, owning_organisation: merging_organisation_2, managing_organisation: merging_organisation, saledate: Time.zone.yesterday)
end
it "returns the correct merging_organisations_lettings_logs_outcomes_text text" do
outcome_text = merging_organisations_lettings_logs_outcomes_text(merge_request)
expect(outcome_text).to include("Org 1 users will have access to all lettings logs owned or managed by the merging organisations after the merge.")
expect(outcome_text).to include("Lettings logs that are owned or managed by the merging organisations and have a tenancy start date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).to include("Some logs are owned and managed by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_to include("Org 2 has no lettings logs.")
expect(outcome_text).to include("View all 3 Org 2 lettings logs (opens in a new tab)")
expect(outcome_text).to include("View 1 Org 3 lettings log (opens in a new tab)")
end
it "returns correct lettings_logs_outcomes_header_text" do
expect(lettings_logs_outcomes_header_text(merge_request)).to eq("4 lettings logs after merge")
end
it "returns the correct merging_organisations_sales_logs_outcomes_text text" do
outcome_text = merging_organisations_sales_logs_outcomes_text(merge_request)
expect(outcome_text).to include("Org 1 users will have access to all sales logs owned or reported by the merging organisations after the merge.")
expect(outcome_text).to include("Sales logs that are owned or reported by the merging organisations and have a sale completion date after the merge date will have their owning or managing organisation changed to Org 1.")
expect(outcome_text).to include("Some logs are owned and reported by different organisations in this merge. They appear in the list for both the owning and the managing organisation.")
expect(outcome_text).not_to include("Org 2 has no sales logs.")
expect(outcome_text).to include("View all 3 Org 2 sales logs (opens in a new tab)")
expect(outcome_text).to include("View 1 Org 3 sales log (opens in a new tab)")
end
it "returns correct sales_logs_outcomes_header_text" do
expect(sales_logs_outcomes_header_text(merge_request)).to eq("4 sales logs after merge")
end
end
end
end
end

8
spec/jobs/process_merge_request_job_spec.rb

@ -13,7 +13,7 @@ describe ProcessMergeRequestJob do
let(:organisation) { create(:organisation) }
let(:merging_organisation) { create(:organisation) }
let(:other_merging_organisation) { create(:organisation) }
let(:merge_request) { MergeRequest.create!(requesting_organisation: organisation, absorbing_organisation: organisation, merge_date: Time.zone.local(2022, 3, 3), total_users: 5, total_schemes: 5, existing_absorbing_organisation: true) }
let(:merge_request) { MergeRequest.create!(requesting_organisation: organisation, absorbing_organisation: organisation, merge_date: Time.zone.local(2022, 3, 3), total_users: 5, total_schemes: 5, total_lettings_logs: 2, total_sales_logs: 8, total_managing_agents: 2, total_stock_owners: 1, existing_absorbing_organisation: true) }
before do
create(:merge_request_organisation, merge_request:, merging_organisation:)
@ -45,7 +45,7 @@ describe ProcessMergeRequestJob do
expect(merge_request.reload.last_failed_attempt).to be_nil
end
it "sets last_failed_attempt value, sets processing to false and clears total_schemes and total_users if there's an error" do
it "sets last_failed_attempt value, sets processing to false and clears all outcomes if there's an error" do
allow(merge_organisations_service).to receive(:call).and_raise(ActiveRecord::Rollback)
expect(merge_request.last_failed_attempt).to be_nil
@ -56,6 +56,10 @@ describe ProcessMergeRequestJob do
expect(merge_request.processing).to eq(false)
expect(merge_request.total_users).to be_nil
expect(merge_request.total_schemes).to be_nil
expect(merge_request.total_managing_agents).to be_nil
expect(merge_request.total_stock_owners).to be_nil
expect(merge_request.total_lettings_logs).to be_nil
expect(merge_request.total_sales_logs).to be_nil
end
end
end

57
spec/requests/merge_requests_controller_spec.rb

@ -470,6 +470,8 @@ RSpec.describe MergeRequestsController, type: :request do
create(:merge_request_organisation, merge_request:, merging_organisation: other_organisation)
create(:merge_request_organisation, merge_request:, merging_organisation:)
create_list(:scheme, 2, owning_organisation: organisation)
create(:lettings_log, owning_organisation: organisation)
create(:sales_log, owning_organisation: organisation)
end
it "runs the job with correct merge request" do
@ -479,6 +481,10 @@ RSpec.describe MergeRequestsController, type: :request do
expect(merge_request.reload.status).to eq("processing")
expect(merge_request.total_users).to eq(5)
expect(merge_request.total_schemes).to eq(2)
expect(merge_request.total_stock_owners).to eq(0)
expect(merge_request.total_managing_agents).to eq(0)
expect(merge_request.total_lettings_logs).to eq(1)
expect(merge_request.total_sales_logs).to eq(1)
end
end
@ -497,6 +503,10 @@ RSpec.describe MergeRequestsController, type: :request do
create(:merge_request_organisation, merge_request:, merging_organisation: other_organisation)
create_list(:scheme, 2, owning_organisation: organisation)
create_list(:scheme, 2, owning_organisation: other_organisation)
create(:lettings_log, owning_organisation: organisation)
create(:lettings_log, owning_organisation: other_organisation)
create_list(:sales_log, 2, owning_organisation: other_organisation)
create(:sales_log, owning_organisation: organisation)
get "/merge-request/#{merge_request.id}", headers:
end
@ -525,15 +535,22 @@ RSpec.describe MergeRequestsController, type: :request do
context "with unmerged request" do
let(:merge_request) { create(:merge_request, absorbing_organisation_id: organisation.id, merge_date: Time.zone.today, existing_absorbing_organisation: true) }
it "shows users and schemes count and has links to view merge outcomes" do
it "shows outcomes count and has links to view merge outcomes" do
expect(page).to have_link("View", href: user_outcomes_merge_request_path(merge_request))
expect(page).to have_link("View", href: scheme_outcomes_merge_request_path(merge_request))
expect(page).to have_link("View", href: relationship_outcomes_merge_request_path(merge_request))
expect(page).to have_link("View", href: logs_outcomes_merge_request_path(merge_request))
expect(page).to have_content("4 users")
expect(page).to have_content("4 schemes")
expect(page).to have_content("0 stock owners")
expect(page).to have_content("0 managing agents")
expect(page).to have_content("2 lettings logs")
expect(page).to have_content("3 sales logs")
end
end
context "with a merged request" do
let(:merge_request) { create(:merge_request, request_merged: true, total_users: 34, total_schemes: 12, total_stock_owners: 8, total_managing_agents: 5) }
let(:merge_request) { create(:merge_request, request_merged: true, total_users: 34, total_schemes: 12, total_stock_owners: 8, total_managing_agents: 5, total_lettings_logs: 4, total_sales_logs: 5) }
it "shows saved users count and doesn't have links to view merge outcomes" do
expect(merge_request.status).to eq("request_merged")
@ -553,6 +570,13 @@ RSpec.describe MergeRequestsController, type: :request do
expect(page).to have_content("8 stock owners")
expect(page).to have_content("5 managing agents")
end
it "shows logs counts and doesn't have links to view merge outcomes" do
expect(merge_request.status).to eq("request_merged")
expect(page).not_to have_link("View", href: logs_outcomes_merge_request_path(merge_request))
expect(page).to have_content("4 lettings logs")
expect(page).to have_content("5 sales logs")
end
end
context "with a processing request" do
@ -631,6 +655,35 @@ RSpec.describe MergeRequestsController, type: :request do
expect(page).to have_content("13 schemes after merge")
end
end
describe "#logs_outcomes" do
let(:merge_request) { create(:merge_request, absorbing_organisation: organisation) }
let(:organisation_with_no_logs) { create(:organisation, name: "Organisation with no logs") }
let(:organisation_with_no_logs_too) { create(:organisation, name: "Organisation with no logs too") }
let(:organisation_with_some_logs) { create(:organisation, name: "Organisation with some logs") }
before do
create_list(:lettings_log, 4, owning_organisation: organisation_with_some_logs)
create_list(:sales_log, 2, owning_organisation: organisation_with_some_logs)
create_list(:lettings_log, 2, owning_organisation: organisation)
create_list(:sales_log, 3, owning_organisation: organisation)
create(:merge_request_organisation, merge_request:, merging_organisation: organisation_with_no_logs)
create(:merge_request_organisation, merge_request:, merging_organisation: organisation_with_no_logs_too)
create(:merge_request_organisation, merge_request:, merging_organisation: organisation_with_some_logs)
get "/merge-request/#{merge_request.id}/logs-outcomes", headers:
end
it "shows logs outcomes after merge" do
expect(page).to have_link("View all 4 Organisation with some logs lettings logs (opens in a new tab)", href: lettings_logs_organisation_path(organisation_with_some_logs))
expect(page).to have_link("View all 2 Organisation with some logs sales logs (opens in a new tab)", href: sales_logs_organisation_path(organisation_with_some_logs))
expect(page).to have_link("View all 2 MHCLG lettings logs (opens in a new tab)", href: lettings_logs_organisation_path(organisation))
expect(page).to have_link("View all 3 MHCLG sales logs (opens in a new tab)", href: sales_logs_organisation_path(organisation))
expect(page).to have_content("Organisation with no logs and Organisation with no logs too have no lettings logs.")
expect(page).to have_content("Organisation with no logs and Organisation with no logs too have no sales logs.")
expect(page).to have_content("6 lettings logs after merge")
expect(page).to have_content("5 sales logs after merge")
end
end
end
context "when user is signed in with a data coordinator user" do

Loading…
Cancel
Save