Skip to content

Commit

Permalink
Add extra expectation for location details
Browse files Browse the repository at this point in the history
Attempting to fix another flaky test.

Refs: #2872
  • Loading branch information
shaun-technovation committed Aug 7, 2021
1 parent 3d06fcc commit 2dc1c5e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
11 changes: 9 additions & 2 deletions spec/system/location/team_locations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@
expect(page).to have_content("Chicago, Illinois, United States")

click_link "Change this team's location"

fill_in "State", with: ""
fill_in "City", with: ""

fill_in "State", with: "California"
fill_in "City", with: "Los Angeles"

click_button "Next"
click_button "Confirm"
expect(page).to have_content("Confirm")

click_button "Confirm"

expect(page).to have_content("Los Angeles, California, United States")
end
end
end
end
14 changes: 13 additions & 1 deletion spec/system/mentor/location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,24 @@
click_button "Profile"
click_button "Region"

fill_in "City", with: ""
fill_in "State / Province", with: ""
fill_in "Country / Territory", with: ""

fill_in "City", with: "Chicago"
expect(page).to have_content("Chicago")

fill_in "State / Province", with: "IL"
expect(page).to have_content("IL")

fill_in "Country / Territory", with: "United States"
expect(page).to have_content("United States")

click_button "Next"
expect(page).to have_content("Confirm")
click_button "Confirm"

visit mentor_profile_path(anchor: '!location')
expect(page).to have_content("Chicago, Illinois, United States")
end
end
end

0 comments on commit 2dc1c5e

Please sign in to comment.