Skip to content

Add compatibility with Rails 7.2 - #165

Open
ledermann wants to merge 2 commits into
testdouble:mainfrom
ledermann:rails-7-2
Open

Add compatibility with Rails 7.2#165
ledermann wants to merge 2 commits into
testdouble:mainfrom
ledermann:rails-7-2

Conversation

@ledermann

@ledermann ledermann commented Aug 14, 2024

Copy link
Copy Markdown

Rails 7.2 has introduced connection pinning in rails/rails#50999 and removed the former method lock_thread=. This PR uses the new methods if they are available, otherwise the previous behavior remains. A deprecation warning is fixed as well.

Resolves #164

rosston added a commit that referenced this pull request Sep 25, 2024
Taken from #165, hence
the coauthor credit.

Co-authored-by: Georg Ledermann <georg@ledermann.dev>
@rosston rosston self-assigned this Feb 25, 2025
benhalpern pushed a commit to forem/forem that referenced this pull request Jul 7, 2026
…#23543)

* test: drop e2e seeds for removed Listing models

- ListingCategory no longer exists, so seed load crashed with a NameError
- unblocks all seeded end-to-end runs, not just new specs

Assisted-by: Claude Fable 5 <noreply@anthropic.com>

* test: patch cypress-rails transactions for Rails 8

- Rails 8 removed ConnectionPool#connection and #lock_thread=
- pin and unpin pools the way Rails 8 transactional fixtures do
- upstream fix (testdouble/cypress-rails#165) remains unmerged

Generated-by: Claude Fable 5 <noreply@anthropic.com>

* fix: keep fullscreen code block exit control reachable

- derive open state from the DOM so clicks never desync from the overlay
- raise the overlay above the fixed header and show the panel without hover
- release the scroll lock and listeners when a soft navigation interrupts
- cover exit, Escape, occlusion, and back/forward flows in jest and cypress

Closes #23535
Generated-by: Claude Fable 5 <noreply@anthropic.com>

* test: always unsubscribe connection subscriber on rollback

- move unsubscribe ahead of the blank-pools early return so an empty
  writing pool list cannot leak the subscriber into later runs
- nil the handle after unsubscribing to make repeat rollbacks inert

Generated-by: Claude Fable 5 <noreply@anthropic.com>

* test: pin page title to stop faker collision flake

- Faker::Book.title draws from a small pool, so the let! page and post
  params can roll the same title
- find_by(title:) then matched the pre-existing page and failed the
  nil expectation in api/v1 pages specs

Generated-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatible with Rails 7.2

2 participants