diff --git a/spec/features/schemes_spec.rb b/spec/features/schemes_spec.rb index 336ee8338..5c668324e 100644 --- a/spec/features/schemes_spec.rb +++ b/spec/features/schemes_spec.rb @@ -204,8 +204,14 @@ RSpec.describe "Schemes scheme Features" do locations.each do |location| expect(page).to have_content(location.id) expect(page).to have_content(location.postcode) - expect(page).to have_content(location.name) - expect(page).to have_content("Active") + if FeatureToggle.new_locations_table_layout_enabled? + expect(page).to have_content(location.name) + expect(page).to have_content("Active") + else + expect(page).to have_content(location.units) + expect(page).to have_content(location.type_of_unit) + expect(page).to have_content(location.startdate&.to_formatted_s(:govuk_date)) + end end end end diff --git a/spec/requests/locations_controller_spec.rb b/spec/requests/locations_controller_spec.rb index 4eb510dcd..df9c497d0 100644 --- a/spec/requests/locations_controller_spec.rb +++ b/spec/requests/locations_controller_spec.rb @@ -871,8 +871,15 @@ RSpec.describe LocationsController, type: :request do locations.each do |location| expect(page).to have_content(location.id) expect(page).to have_content(location.postcode) - expect(page).to have_content(location.name) - expect(page).to have_content(location.status) + if FeatureToggle.new_locations_table_layout_enabled? + expect(page).to have_content(location.name) + expect(page).to have_content(location.status) + else + expect(page).to have_content(location.type_of_unit) + expect(page).to have_content(location.mobility_type) + expect(page).to have_content(location.location_admin_district) + expect(page).to have_content(location.startdate&.to_formatted_s(:govuk_date)) + end end end @@ -974,8 +981,13 @@ RSpec.describe LocationsController, type: :request do locations.each do |location| expect(page).to have_content(location.id) expect(page).to have_content(location.postcode) - expect(page).to have_content(location.name) - expect(page).to have_content(location.status) + if FeatureToggle.new_locations_table_layout_enabled? + expect(page).to have_content(location.name) + expect(page).to have_content(location.status) + else + expect(page).to have_content(location.type_of_unit) + expect(page).to have_content(location.startdate&.to_formatted_s(:govuk_date)) + end end end