Skip to content

Commit 6550520

Browse files
PivotGrid - Fix unstable tests - QUnit - sortable.tests.js (#32588)
1 parent a3409a6 commit 6550520

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/sortable.tests.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ QUnit.module('sortable without containers', () => {
197197
assert.equal($items.eq(3).text(), '4', 'item 3 text');
198198
});
199199

200-
QUnit.skip('horizontal dragging between lines', function(assert) {
200+
QUnit.test('horizontal dragging between lines', function(assert) {
201201
createHorizontalMarkUp(HORIZONTAL_WIDTH_SMALL, true);
202202

203203
const $sortable = $('#sortable').dxSortableOld({
@@ -225,11 +225,11 @@ QUnit.module('sortable without containers', () => {
225225
assert.equal($items.eq(1).text(), '3', 'item 1 text');
226226
assert.equal($items.eq(2).text(), '4', 'item 2 text');
227227
assert.equal($items.eq(3).text(), '5', 'item 3 text');
228-
assert.equal($items.eq(4).text(), '1', 'item 4 text');
229-
assert.equal($items.eq(5).text(), '6', 'item 5 text');
228+
assert.equal($items.eq(4).text(), '6', 'item 4 text');
229+
assert.equal($items.eq(5).text(), '1', 'item 5 text');
230230
});
231231

232-
QUnit.skip('horizontal dragging between lines to the end of the first line', function(assert) {
232+
QUnit.test('horizontal dragging between lines to the end of the first line', function(assert) {
233233
createHorizontalMarkUp(HORIZONTAL_WIDTH_SMALL, true);
234234

235235
const $sortable = $('#sortable').dxSortableOld({
@@ -490,7 +490,7 @@ QUnit.module('sortable without containers', () => {
490490
assert.ok(!changedArgs, 'changed called');
491491
});
492492

493-
QUnit.skip('dragging not allowed item', function(assert) {
493+
QUnit.test('dragging not allowed item', function(assert) {
494494
let changedArgs;
495495
const $sortable = $('#sortable').dxSortableOld({
496496
itemSelector: '.test-item',
@@ -500,6 +500,8 @@ QUnit.module('sortable without containers', () => {
500500
}
501501
});
502502

503+
$('<div>').addClass('not-test-item').text('X').appendTo('.test-container');
504+
503505
const $item = $sortable.find('.not-test-item').eq(0);
504506
const offset = $item.offset();
505507

@@ -1768,7 +1770,7 @@ QUnit.module('Horizontal direction. RTL', {
17681770
assert.strictEqual(this.sortable.option('onChanged').lastCall.args[0].targetIndex, 2);
17691771
});
17701772

1771-
QUnit.skip('horizontal dragging between lines', function(assert) {
1773+
QUnit.test('horizontal dragging between lines', function(assert) {
17721774
createHorizontalMarkUp(HORIZONTAL_WIDTH_SMALL, true);
17731775

17741776
const $sortable = this.createSortable({});
@@ -1790,11 +1792,11 @@ QUnit.module('Horizontal direction. RTL', {
17901792
assert.equal($items.eq(1).text(), '3', 'item 1 text');
17911793
assert.equal($items.eq(2).text(), '4', 'item 2 text');
17921794
assert.equal($items.eq(3).text(), '5', 'item 3 text');
1793-
assert.equal($items.eq(4).text(), '1', 'item 4 text');
1794-
assert.equal($items.eq(5).text(), '6', 'item 5 text');
1795+
assert.equal($items.eq(4).text(), '6', 'item 4 text');
1796+
assert.equal($items.eq(5).text(), '1', 'item 5 text');
17951797

17961798
assert.strictEqual(this.sortable.option('onChanged').lastCall.args[0].sourceIndex, 0);
1797-
assert.strictEqual(this.sortable.option('onChanged').lastCall.args[0].targetIndex, 5);
1799+
assert.strictEqual(this.sortable.option('onChanged').lastCall.args[0].targetIndex, 6);
17981800
});
17991801

18001802
QUnit.test('drag to the end of the container', function(assert) {

0 commit comments

Comments
 (0)