Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Judahmeek committed Apr 13, 2024
1 parent d5fdd16 commit 5ece31c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
6 changes: 2 additions & 4 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
2 changes: 2 additions & 0 deletions test/dummy/app/controllers/counters_controller.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

class CountersController < ApplicationController
def index
@counters = [{ name: "Counter 1" }]
Expand Down
2 changes: 1 addition & 1 deletion test/dummy/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions test/react/rails/realtime_update_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 5ece31c

Please sign in to comment.