From dbfc18a11f8650e4c2c5985735d24de3403b5b49 Mon Sep 17 00:00:00 2001 From: Kat Date: Wed, 3 Apr 2024 12:03:57 +0100 Subject: [PATCH] Uncomment skipped tests --- spec/features/home_page_spec.rb | 12 ++++++------ spec/requests/lettings_logs_controller_spec.rb | 6 +++--- spec/requests/locations_controller_spec.rb | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/spec/features/home_page_spec.rb b/spec/features/home_page_spec.rb index 2eeb909cf..1477a10df 100644 --- a/spec/features/home_page_spec.rb +++ b/spec/features/home_page_spec.rb @@ -163,7 +163,7 @@ RSpec.describe "Home Page Features" do Singleton.__init__(FormHandler) end - xit "displays correct data boxes, counts and links" do + it "displays correct data boxes, counts and links" do data_boxes = page.find_all(class: "app-data-box-one-half") expect(data_boxes.count).to eq(2) expect(data_boxes[0].all("a").map(&:text)).to eq(["6", "Your lettings in progress", "View all lettings"]) @@ -188,7 +188,7 @@ RSpec.describe "Home Page Features" do Singleton.__init__(FormHandler) end - xit "displays correct data boxes, counts and links" do + it "displays correct data boxes, counts and links" do data_boxes = page.find_all(class: "app-data-box-one-half") expect(data_boxes.count).to eq(2) @@ -205,7 +205,7 @@ RSpec.describe "Home Page Features" do visit(root_path) end - xit "displays correct data boxes, counts and links" do + it "displays correct data boxes, counts and links" do data_boxes = page.find_all(class: "app-data-box-one-half") expect(data_boxes.count).to eq(2) expect(data_boxes[0].all("a").map(&:text)).to eq(["6", "Your lettings in progress", "View all lettings"]) @@ -244,7 +244,7 @@ RSpec.describe "Home Page Features" do visit(root_path) end - xit "displays correct data boxes, counts and links" do + it "displays correct data boxes, counts and links" do data_boxes = page.find_all(class: "app-data-box-one-third") expect(data_boxes.count).to eq(3) expect(data_boxes[0].all("a").map(&:text)).to eq(["8", "Lettings in progress", "View all lettings"]) @@ -261,7 +261,7 @@ RSpec.describe "Home Page Features" do visit(root_path) end - xit "displays correct data boxes, counts and links" do + it "displays correct data boxes, counts and links" do data_boxes = page.find_all(class: "app-data-box-one-half") expect(data_boxes.count).to eq(2) expect(data_boxes[0].all("a").map(&:text)).to eq(["8", "Lettings in progress", "View all lettings"]) @@ -309,7 +309,7 @@ RSpec.describe "Home Page Features" do expect(page).to have_content("Manage all data") end - xit "displays correct data boxes, counts and links" do + it "displays correct data boxes, counts and links" do data_boxes = page.find_all(class: "app-data-box-one-third") expect(data_boxes.count).to eq(3) expect(data_boxes[0].all("a").map(&:text)).to eq(["2", "Lettings in progress", "View all lettings"]) diff --git a/spec/requests/lettings_logs_controller_spec.rb b/spec/requests/lettings_logs_controller_spec.rb index 0ff9edf0e..26a830eb7 100644 --- a/spec/requests/lettings_logs_controller_spec.rb +++ b/spec/requests/lettings_logs_controller_spec.rb @@ -812,7 +812,7 @@ RSpec.describe LettingsLogsController, type: :request do expect(page).to have_title("Lettings logs (#{logs.count} logs matching ‘#{postcode}’) (page 1 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") end - xit "has title with pagination details for page 2" do + it "has title with pagination details for page 2" do get "/lettings-logs?search=#{logs[0].postcode_full}&page=2", headers:, params: {} expect(page).to have_title("Lettings logs (#{logs.count} logs matching ‘#{postcode}’) (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") end @@ -969,7 +969,7 @@ RSpec.describe LettingsLogsController, type: :request do end end - xcontext "when on the second page" do + context "when on the second page" do before do get "/lettings-logs?page=2", headers:, params: {} end @@ -1641,7 +1641,7 @@ RSpec.describe LettingsLogsController, type: :request do expect(page).to have_content("Log #{id} has been deleted.") end - xit "marks the log as deleted" do + it "marks the log as deleted" do expect { delete_request }.to change { lettings_log.reload.status }.from("completed").to("deleted") end end diff --git a/spec/requests/locations_controller_spec.rb b/spec/requests/locations_controller_spec.rb index 392be28f2..76c32cbf6 100644 --- a/spec/requests/locations_controller_spec.rb +++ b/spec/requests/locations_controller_spec.rb @@ -249,16 +249,16 @@ RSpec.describe LocationsController, type: :request do get "/schemes/#{scheme.id}/locations?page=2" end - xit "shows which schemes are being shown on the current page" do + it "shows which schemes are being shown on the current page" do expect(CGI.unescape_html(response.body)).to match("Showing 21 to 25 of #{locations.count} locations") end - xit "has correct page 2 of 2 title" do + it "has correct page 2 of 2 title" do expected_title = CGI.escapeHTML("#{scheme.service_name} (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") expect(page).to have_title(expected_title) end - xit "has pagination links" do + it "has pagination links" do expect(page).to have_content("Previous") expect(page).to have_link("Previous") expect(page).not_to have_content("Next") @@ -377,16 +377,16 @@ RSpec.describe LocationsController, type: :request do get "/schemes/#{scheme.id}/locations?page=2" end - xit "shows which schemes are being shown on the current page" do + it "shows which schemes are being shown on the current page" do expect(CGI.unescape_html(response.body)).to match("Showing 21 to 25 of #{locations.count} locations") end - xit "has correct page 1 of 2 title" do + it "has correct page 1 of 2 title" do expected_title = CGI.escapeHTML("#{scheme.service_name} (page 2 of 2) - Submit social housing lettings and sales data (CORE) - GOV.UK") expect(page).to have_title(expected_title) end - xit "has pagination links" do + it "has pagination links" do expect(page).to have_content("Previous") expect(page).to have_link("Previous") expect(page).not_to have_content("Next")