Skip to content

Support DOM changes during #solidus_select helper execution - #6707

Merged
jarednorman merged 1 commit into
solidusio:mainfrom
benjaminwil:solidus-select-dom-replacement
Oct 23, 2026
Merged

jarednorman merged 1 commit into
solidusio:mainfrom
benjaminwil:solidus-select-dom-replacement

Conversation

@benjaminwil

Copy link
Copy Markdown
Contributor

Summary

Sometimes, a select component will be used to trigger a change to the DOM via a Stimulus controller. Sometimes that means that the select element itself could be replaced.

If we don't re-find the elements during the #solidus_select helper method, then we end up erroring out due to a Selenium::WebDriver::Error::StaleElementReferenceError.

Checklist

Check out our PR guidelines for more details.

The following are mandatory for all PRs:

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.46%. Comparing base (07d5aff) to head (015442a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6707   +/-   ##
=======================================
  Coverage   92.46%   92.46%           
=======================================
  Files        1058     1058           
  Lines       21495    21495           
=======================================
  Hits        19875    19875           
  Misses       1620     1620           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@benjaminwil
benjaminwil marked this pull request as ready for review October 21, 2026 23:15
@benjaminwil
benjaminwil requested a review from a team as a code owner October 21, 2026 23:15

@jarednorman jarednorman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit. Otherwise looks good!

Comment thread admin/lib/solidus_admin/testing_support/feature_helpers.rb Outdated
Sometimes, a select component will be used to trigger a change to the
DOM via a Stimulus controller. Sometimes that means that the select
element itself could be replaced.

If we don't re-find the elements during the `#solidus_select` helper
method, then we end up erroring out due to a
`Selenium::WebDriver::Error::StaleElementReferenceError`.
@benjaminwil
benjaminwil force-pushed the solidus-select-dom-replacement branch from 9935dd7 to 015442a Compare October 23, 2026 16:25
@jarednorman
jarednorman merged commit 4150395 into solidusio:main Oct 23, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants