Extract component to render question options table

This way it's easier to know that the styles for the `break` HTML class
and the JavaScript for sortable elements (which we shouldn't use, by the
way, because of its accessibility issues) are only used here.
This commit is contained in:
Javi Martín
2025-11-05 18:39:19 +01:00
parent d6f6b94ae4
commit 2d72144048
8 changed files with 61 additions and 52 deletions

View File

@@ -94,7 +94,7 @@ describe "Poll question options", :admin do
visit admin_question_path(question)
within("tbody.sortable") do
within(".poll-question-options-table tbody") do
expect("First").to appear_before("Last")
find("tr", text: "Last").drag_to(find("tr", text: "First"))