Skip to content

Commit

Permalink
Add a system test for the document list block
Browse files Browse the repository at this point in the history
  • Loading branch information
leenagupte committed Nov 29, 2024
1 parent ce8681d commit d269898
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions spec/system/landing_page_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
require "gds_api/test_helpers/search"

RSpec.describe "LandingPage" do
include GdsApi::TestHelpers::Search
include SearchHelpers

context "show" do
let(:content_item) do
Expand Down Expand Up @@ -46,7 +44,7 @@
stub_content_store_has_item(base_path, content_item)
stub_request(:get, %r{/media/000000000000000000000001/data_one.csv}).to_return(status: 200, body: File.read("spec/fixtures/landing_page_statistics_data/data_one.csv"), headers: {})
stub_content_store_has_item(basic_taxon["base_path"], basic_taxon)
stub_any_search_to_return_no_results
stub_taxon_search_results
end

it "displays the page" do
Expand Down Expand Up @@ -95,5 +93,12 @@

assert_selector ".govuk-breadcrumbs"
end

it "renders a document list" do
visit base_path

assert_selector ".gem-c-heading"
assert_selector ".gem-c-document-list"
end
end
end

0 comments on commit d269898

Please sign in to comment.