Skip to content

Commit

Permalink
Matches click selectors with html
Browse files Browse the repository at this point in the history
  • Loading branch information
rosschapman committed Sep 28, 2023
1 parent 01f4512 commit f19662e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,3 @@ Style/TrailingCommaInArrayLiteral:
Rails/CreateTableWithTimestamps:
Exclude:
- db/schema.rb

Capybara/ClickLinkOrButtonStyle:
EnforcedStyle: link_or_button
2 changes: 1 addition & 1 deletion spec/support/system_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Spec
module SystemHelpers
def sign_in(user, space)
visit(polymorphic_path(space.location))
click_link_or_button("Sign in")
click_link("Sign in")
fill_in("authenticated_session[contact_location]", with: user.email)
find('input[type="submit"]').click
perform_enqueued_jobs
Expand Down
6 changes: 3 additions & 3 deletions spec/system/furniture_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
def add_gizmo(type, room:)
visit(polymorphic_path(room.location(:edit)))
select(type, from: "Type of gizmo")
click_link_or_button("Add Gizmo")
click_button("Add Gizmo")
end

def remove_gizmo(type, room:)
visit(polymorphic_path(room.location(:edit)))
expect(page).to have_text("Markdown Text Block")
within("##{dom_id(room.gizmos.first)}") do
click_link_or_button "Configure Markdown Text Block"
click_link "Configure Markdown Text Block"
end
click_link_or_button "Remove Gizmo"
click_link "Remove Gizmo"
end
end

0 comments on commit f19662e

Please sign in to comment.