How can I test sortableJs ? (RSpec)
I made a drag and drop to-do-list with SortableJs and i'm trying to test the drag-n-drop with RSpec/Selenium/Capybara if the request is sent onEnd.
I'm able to do the drag n drop using selenium drag_and_drop
. My card is dropped in the right column but when i check if the status is persisted it looks like my PlannedAction still has it's previous status..
I tried to page.execute_script('const action_card = document.querySelector(".c-action-card"); action_card.dispatchEvent(new Event("dragend"));')
to force the event to be fired and get the stimulus controller to react but still nothing..