require "integration_test_helper"

class CoronavirusLocalRestrictionsTest < ActionDispatch::IntegrationTest
  it "visits postcode lookup page" do
    given_i_am_on_the_local_restrictions_page
    then_i_can_see_the_postcode_lookup
  end

  def given_i_am_on_the_local_restrictions_page
    visit find_coronavirus_local_restrictions_path
  end

  def then_i_can_see_the_postcode_lookup
    assert page.has_text?(I18n.t("coronavirus_local_restrictions.lookup.title"))
  end
end

require "integration_test_helper"

class CoronavirusLocalRestrictionsTest < ActionDispatch::IntegrationTest
  it "visits postcode lookup page" do
    given_i_am_on_the_local_restrictions_page
    then_i_can_see_the_postcode_lookup_form
  end

  def given_i_am_on_the_local_restrictions_page
    visit find_coronavirus_local_restrictions_path
  end

  def then_i_can_see_the_postcode_lookup_form
    assert page.has_text?(I18n.t("coronavirus_local_restrictions.lookup.title"))
    assert page.has_text?(I18n.t("coronavirus_local_restrictions.lookup.input_label"))
  end
end

Check form label displays in feature test
Check form label displays in feature test

- We will add to this test in the follow up PR

Co-authored-by: Alex Newton <a4a07234de0a205690872ef5d9931abdf491c9ba@digital.cabinet-office.gov.uk>
Co-authored-by: Jonathan Hallam <jonathan.hallam@digital.cabinet-office.gov.uk
