赛普拉斯拖放测试

时间:2019-01-23 11:29:40

标签: django drag-and-drop jquery-ui-sortable cypress

我想用Cypress.io测试可排序表

我遵循他们的页面说明:https://docs.cypress.io/api/commands/trigger.html#Mouse-Events

它不起作用...

首先:它不会移动元素

第二:当我在左侧看到逐步测试时,鼠标向下移动时鼠标位于同一位置...

我的测试

cy.get('.resource-filter-table')
        .trigger('mousedown', {witch:1, pageX:188, pageY:196})
        .trigger('mousemove', {witch:1, pageX:188, pageY:261})
        .trigger('mouseup')

我的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>

0 个答案:

没有答案
相关问题