Skip to content

Commit

Permalink
Fix System Tests in CI environment
Browse files Browse the repository at this point in the history
Resolve breaking changes introduced in `@hotwired/turbo` that were later
fixed in [@hotwired/turbo#4f334da][] (and further resolved in
[@hotwired/turbo#7a7c6e2][]).

CI is failing because those changes are not available as part of a beta
release. Despite the fact that these changes wouldn't be necessary if
that release were available, this resolves the broken build pipeline
more immediately.

[@hotwired/turbo#4f334da]: hotwired/turbo@4f334da
[@hotwired/turbo#7a7c6e2]: hotwired/turbo@7a7c6e2
  • Loading branch information
seanpdoyle committed Dec 7, 2023
1 parent 4eb4e92 commit 2a4640e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion test/dummy/app/javascript/application.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails
import "@hotwired/turbo-rails"
import { Turbo } from "@hotwired/turbo-rails"

window.StreamActions = Turbo.StreamActions
2 changes: 1 addition & 1 deletion test/system/broadcasts_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def assert_broadcasts_text(text, to:, &block)

def assert_forwards_turbo_stream_tag_attribute(attr_key:, attr_value:, to:, &block)
execute_script(<<~SCRIPT)
Turbo.StreamActions.test = function () {
StreamActions.test = function () {
const attribute = this.getAttribute('#{attr_key}')
document.getElementById('#{to}').innerHTML = attribute
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ hasown@^2.0.0:
dependencies:
function-bind "^1.1.2"

"idiomorph@git+https://github.com/basecamp/idiomorph.git#rollout-build":
"idiomorph@https://github.com/basecamp/idiomorph#rollout-build":
version "0.0.8"
resolved "git+https://github.com/basecamp/idiomorph.git#e906820368e4c9c52489a3336b8c3826b1bf6de5"
resolved "https://github.com/basecamp/idiomorph#e906820368e4c9c52489a3336b8c3826b1bf6de5"

is-core-module@^2.13.0:
version "2.13.1"
Expand Down

0 comments on commit 2a4640e

Please sign in to comment.