diff --git a/Appraisals b/Appraisals index 30b422ba9..da0f56653 100644 --- a/Appraisals +++ b/Appraisals @@ -4,6 +4,7 @@ appraise 'sprockets_4' do gem 'sprockets-rails' gem 'turbolinks', '~> 5' gem 'mini_racer', :platforms => :mri + gem 'turbo-rails' end appraise 'sprockets_3' do @@ -12,6 +13,7 @@ appraise 'sprockets_3' do gem 'sprockets-rails' gem 'turbolinks', '~> 5' gem 'mini_racer', :platforms => :mri + gem 'turbo-rails' end appraise 'shakapacker' do @@ -21,9 +23,5 @@ appraise 'shakapacker' do end appraise 'base' do - # Appraisal adds `turbolinks` to this gemfile because it is - # present in `./Gemfile`. - # But it causes this gemfile to break, so it must be removed - # from `./gemfiles/rails_5_no_sprockets.gemfile` manually. gem 'rails', '~> 7.0.x' end diff --git a/test/dummy/app/controllers/counters_controller.rb b/test/dummy/app/controllers/counters_controller.rb index 5e9bdba98..2d4296db4 100644 --- a/test/dummy/app/controllers/counters_controller.rb +++ b/test/dummy/app/controllers/counters_controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class CountersController < ApplicationController def index @counters = [{ name: "Counter 1" }] diff --git a/test/dummy/config/routes.rb b/test/dummy/config/routes.rb index 6fdeabe75..0c308456b 100644 --- a/test/dummy/config/routes.rb +++ b/test/dummy/config/routes.rb @@ -3,7 +3,7 @@ Dummy::Application.routes.draw do get "no-turbolinks", to: "pages#no_turbolinks" resources :pages, only: [:show] - resources :counters, only: [:create, :index] + resources :counters, only: %i[create index] resources :server, only: [:show] do collection do get :console_example diff --git a/test/react/rails/realtime_update_test.rb b/test/react/rails/realtime_update_test.rb index 99d2c1967..f8e907810 100644 --- a/test/react/rails/realtime_update_test.rb +++ b/test/react/rails/realtime_update_test.rb @@ -9,7 +9,7 @@ class RealtimeUpdateTest < ActiveSupport::TestCase def assert_counter_count(page, timer_name, count) assert page.has_content?("#{timer_name} - #{count}"), <<~MSG #{page.body} - #{page.driver.browser.logs.get(:browser).inspect} + #{page.driver.browser.manage.logs.get(:browser).inspect} MSG end @@ -28,10 +28,9 @@ def assert_counter_count(page, timer_name, count) assert_counter_count(page, "Counter 1", 0) page.click_button "Increment Counter 1" - assert_counter_count(page, "Counter 1", 1) - page.click_button "Add counter" sleep 0.1 + assert_counter_count(page, "Counter 1", 1) assert_counter_count(page, "Counter 2", 0) end