I’m trying to test that I can drag one element to another. I’ve tried to work with the touch commands and the mouse + mouse button commands (as suggested by this issue), but so far nothing has worked.
An example of what I’ve tried:
# this returns the correct element
find(session, css("##{first_card_id}")) |> dbg()
dropzone = session |> find(css("#dropzone-0"))
# get center of dropzone
{drop_x, drop_y} = Wallaby.Element.location(dropzone)
{width, height} = Wallaby.Element.size(dropzone)
{drop_x, drop_y} = {drop_x + width / 2, drop_y + height / 2}
# Perform drag and drop using touch events
session
|> touch_down(css("##{first_card_id}")) # same query as above
|> touch_move(drop_x, drop_y)
|> touch_up()