问题
I would like to test the sortable table with Cypress.io
I follow their page instruction: https://docs.cypress.io/api/commands/trigger.html#Mouse-Events
and it doesn't work...
First: it doesn't move the element
Second: when I see the step by step test on the left side, mouse down and mouse move are located in the same position...
my test
cy.get('.resource-filter-table')
.trigger('mousedown', {witch:1, pageX:188, pageY:196})
.trigger('mousemove', {witch:1, pageX:188, pageY:261})
.trigger('mouseup')
my html
<table class="table table-borderless resource-filter-table">
<thead>
<th scope="col"><input type="checkbox" checked=True class="resourceFilterElementAll" onchange="checkAllResources(this)"></th>
<th scope="col">Line</th>
</thead>
<tbody>
{% for linija in user_lines %}
<tr>
<th><input type="checkbox" checked=True class="resourceFilterElement" onchange="filterOfResources()" id="{{linija.pk}}"></th>
<th class="filter-list-element">{{ linija.line_name}} <i class="filter-list-icon material-icons">drag_handle</i></th>
</tr>
{% endfor %}
</tbody>
</table>
来源:https://stackoverflow.com/questions/54326250/cypress-drag-and-drop-test