Downgrade importmap-rails to 1.2

v2.0.1 down not fire turbo:load event in test env, which causes tests to
fail.
Issue reported: https://github.com/rails/importmap-rails/issues/233
This commit is contained in:
cryptogopher 2024-01-12 19:30:09 +01:00
parent 4e91c89153
commit a4f113ad48
3 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ gem "devise"
gem 'awesome_nested_set' gem 'awesome_nested_set'
gem 'importmap-rails' gem 'importmap-rails', '~> 1.2.3'
# turborails >= 2.0.0 required with npm v8.0.0 with support for [autofocus] # turborails >= 2.0.0 required with npm v8.0.0 with support for [autofocus]
# attribute in turbo-streams # attribute in turbo-streams
gem 'turbo-rails', '> 1.5.0' gem 'turbo-rails', '> 1.5.0'

View File

@ -112,7 +112,7 @@ GEM
activesupport (>= 6.1) activesupport (>= 6.1)
i18n (1.14.1) i18n (1.14.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
importmap-rails (2.0.1) importmap-rails (1.2.3)
actionpack (>= 6.0.0) actionpack (>= 6.0.0)
activesupport (>= 6.0.0) activesupport (>= 6.0.0)
railties (>= 6.0.0) railties (>= 6.0.0)
@ -255,7 +255,7 @@ DEPENDENCIES
byebug byebug
capybara capybara
devise devise
importmap-rails importmap-rails (~> 1.2.3)
mysql2 (~> 0.5) mysql2 (~> 0.5)
puma (~> 6.0) puma (~> 6.0)
rails (~> 7.1.2) rails (~> 7.1.2)

View File

@ -24,7 +24,7 @@ class UnitsTest < ApplicationSystemTestCase
fill_in 'unit[name]', fill_in 'unit[name]',
with: [nil, SecureRandom.alphanumeric(rand(1..maxlength['unit[name]']))].sample with: [nil, SecureRandom.alphanumeric(rand(1..maxlength['unit[name]']))].sample
assert_difference ->{ Unit.count }, 1 do assert_difference ->{ Unit.count }, 1 do
click_on t(:add) click_on t('helpers.submit.create')
end end
end end