Skip to content

Commit

Permalink
Update selenium-chromedriver gem and fix missing turbo frame element …
Browse files Browse the repository at this point in the history
…javascript error (#402)

* Update Gemfile

* update

* note to remove chromedriver locally for tests to pass

* fix found by consulting  hotwired/turbo#863
  • Loading branch information
jcowhigjr authored Dec 20, 2023
1 parent 37549b7 commit 660fd55
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ brew 'lefthook'
brew 'ngrok'
# brew 'solargraph'
# brew 'solargrpah-rails'

# chromedriver not required anymore
# brew uninstall chromedriver
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ group :test do

# Easy installation and use of web drivers to run system tests with browsers
gem 'matrix'
gem 'webdrivers'

# gem 'minitest-colorize'
gem 'cuprite'
Expand Down
5 changes: 0 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,6 @@ GEM
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webdrivers (5.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
webrick (1.7.0)
websocket (1.2.10)
websocket-driver (0.7.6)
Expand Down Expand Up @@ -523,7 +519,6 @@ DEPENDENCIES
turbo-rails (~> 1.5.0)
tzinfo-data
web-console
webdrivers

RUBY VERSION
ruby 3.2.2p53
Expand Down
2 changes: 1 addition & 1 deletion app/views/reviews/_show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<%= link_to t('.edit-this-revie-0'), edit_user_review_path(current_user, review), class: 'btn-small' %>
</div>
<div class="col s6">
<%= link_to t('.delete-this-rev'), user_review_path(current_user, review), class: 'btn-small', data: { turbo_method: :delete } %>
<%= link_to t('.delete-this-rev'), user_review_path(current_user, review), class: 'btn-small', data: { turbo_method: :delete, turbo_frame: '_top' } %>
</div>
</div>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions test/system/coffeeshops_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class CoffeeshopsTest < ApplicationSystemTestCase
assert_text('"this place is bad"', count: 1)
assert_selector('#review_rating', text: '★☆☆☆☆')
assert_current_path %r{^/coffeeshops/\d{1,9}}

click_on 'Delete', match: :first

assert_current_path %r{^/coffeeshops/\d{1,9}}
Expand Down

0 comments on commit 660fd55

Please sign in to comment.