Skip to content

Commit

Permalink
Remove the unnecessary JS in placements testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie authored and JamieCleare2525 committed Jun 25, 2024
1 parent 0c1ebc4 commit 746b625
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

RSpec.describe "Placements / Placements / Searching for a placements list",
type: :system,
service: :placements,
js: true do
service: :placements do
let(:provider) { create(:placements_provider, name: "Provider") }
let(:london_school) do
create(
Expand Down
5 changes: 2 additions & 3 deletions spec/system/placements/placements/view_a_placement_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

RSpec.describe "Placements / Placements / View a placement",
type: :system,
service: :placements,
js: true do
service: :placements do
let(:provider) { create(:placements_provider, name: "Provider") }
let(:school) do
create(
Expand Down Expand Up @@ -107,7 +106,7 @@ def then_i_see_details_for_the_school

def and_i_see_location_details_for_the_school
expect(page).to have_content("Location")
expect(page).to have_content("London Secondary School\nLondon\nCity of London\nLN01 2LN")
expect(page).to have_content("London Secondary School London City of London LN01 2LN")
end

def and_i_see_the_itt_placement_contact_details_for_the_school
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

RSpec.describe "Placements / Placements / View placements list",
type: :system,
service: :placements,
js: true do
service: :placements do
let(:provider) { create(:placements_provider, name: "Provider") }
let!(:primary_school) do
create(
Expand Down Expand Up @@ -260,7 +259,7 @@
when_i_click_on("Clear search")
then_i_can_see_a_placement_for_school_and_subject("Primary School", "Primary with mathematics")
and_i_can_see_a_preset_filter("School", "Primary School")
and_i_can_see_search_location_is_set_as("")
and_i_can_see_search_location_is_set_as(nil)
end
end
end
Expand Down Expand Up @@ -323,14 +322,14 @@ def then_i_see_the_empty_state
end

def then_i_can_see_a_placement_for_school_and_subject(school_name, subject_name)
expect(page).to have_content("#{school_name}\n#{subject_name}")
expect(page).to have_content("#{school_name} #{subject_name}")
end

alias_method :and_i_can_see_a_placement_for_school_and_subject,
:then_i_can_see_a_placement_for_school_and_subject

def then_i_can_not_see_a_placement_for_school_and_subject(school_name, subject_name)
expect(page).not_to have_content("#{school_name}\n#{subject_name}")
expect(page).not_to have_content("#{school_name} #{subject_name}")
end

alias_method :and_i_can_not_see_a_placement_for_school_and_subject,
Expand Down

0 comments on commit 746b625

Please sign in to comment.