Fix test based on unavailable td.link selector

This commit is contained in:
2026-04-04 16:46:59 +02:00
parent 65edb866d0
commit 376640cfd7
2 changed files with 7 additions and 5 deletions

View File

@@ -25,9 +25,10 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
user
end
def inject_button_to(after, *button_options)
def inject_button_to(inside, *button_options)
button = button_to *button_options
evaluate_script("arguments[0].insertAdjacentHTML('beforeend', '#{button.html_safe}');", after)
inside.evaluate_script("this.insertAdjacentHTML('beforeend', arguments[0]);",
button.html_safe)
end
# Allow skipping interpolations when translating for testing purposes