Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,6 @@ baseConfigs.forEach(baseConfig => {
return isOpenedStateMode && isPosition;
}

function testOrSkip(name, skip, callback) {
if(skip()) {

// QUnit.skip(name + ' - NOT SUPPORTED', function() {});
} else {
QUnit.test(name, callback);
}
}

[undefined, 25].forEach(minSize => {
QUnit.test('opened: false', function(assert) {
const drawerElement = $('#' + drawerTesters.drawerElementId).get(0);
Expand Down Expand Up @@ -309,7 +300,7 @@ baseConfigs.forEach(baseConfig => {
});
});

testOrSkip(`(revealMode: ${revealMode}) opened: false, visible: false -> visible: true -> opened: true`, () => configIs('overlap'), function(assert) {
QUnit.test(`(revealMode: ${revealMode}) opened: false, visible: false -> visible: true -> opened: true`, function(assert) {
const drawerElement = $('#' + drawerTesters.drawerElementId).get(0);
const drawer = new dxDrawer(drawerElement, getFullDrawerOptions({
opened: false,
Expand All @@ -324,7 +315,11 @@ baseConfigs.forEach(baseConfig => {
drawer.option('opened', true);
this.clock.tick(100);

drawerTesters[baseConfig.position].checkOpened(assert, drawer, drawerElement);
if(!configIs('overlap')) {
drawerTesters[baseConfig.position].checkOpened(assert, drawer, drawerElement);
} else {
assert.strictEqual(drawer._overlay.option('visible'), true, 'panel is opened');
}
});


Expand Down Expand Up @@ -489,7 +484,7 @@ baseConfigs.forEach(baseConfig => {
drawerTesters[baseConfig.position].checkOpened(assert, drawer, drawerElement);
});

testOrSkip('opened: true (T813710: template + rendered + _viewPortChangeHandler)', () => configIs(['shrink', 'push']) || configIs(undefined, 'right'), function(assert) {
QUnit.test('opened: true (T813710: template + rendered + _viewPortChangeHandler)', function(assert) {
const drawerElement = $('#' + drawerTesters.drawerElementId).get(0);
const drawer = new dxDrawer(drawerElement, getFullDrawerOptions({
opened: true,
Expand Down Expand Up @@ -517,7 +512,7 @@ baseConfigs.forEach(baseConfig => {
drawerTesters[baseConfig.position].checkOpened(assert, drawer, drawerElement);
});

testOrSkip('opened: true, visible: false -> visible: true', () => configIs('overlap'), function(assert) {
QUnit.test('opened: true, visible: false -> visible: true', function(assert) {
const drawerElement = $('#' + drawerTesters.drawerElementId).get(0);
const drawer = new dxDrawer(drawerElement, getFullDrawerOptions({
opened: true,
Expand All @@ -529,10 +524,14 @@ baseConfigs.forEach(baseConfig => {
drawer.option('visible', true);
this.clock.tick(100);

drawerTesters[baseConfig.position].checkOpened(assert, drawer, drawerElement);
if(!configIs('overlap')) {
drawerTesters[baseConfig.position].checkOpened(assert, drawer, drawerElement);
} else {
assert.strictEqual(drawer._overlay.option('visible'), true, 'panel is opened');
}
});

testOrSkip('opened: true, visible: false -> repaint -> visible: true', () => configIs('overlap'), function(assert) {
QUnit.test('opened: true, visible: false -> repaint -> visible: true', function(assert) {
const drawerElement = $('#' + drawerTesters.drawerElementId).get(0);
const drawer = new dxDrawer(drawerElement, getFullDrawerOptions({
opened: true,
Expand All @@ -547,7 +546,11 @@ baseConfigs.forEach(baseConfig => {
drawer.option('visible', true);
this.clock.tick(100);

drawerTesters[baseConfig.position].checkOpened(assert, drawer, drawerElement);
if(!configIs('overlap')) {
drawerTesters[baseConfig.position].checkOpened(assert, drawer, drawerElement);
} else {
assert.strictEqual(drawer._overlay.option('visible'), true, 'panel is opened');
}
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ QUnit.module('Drawer behavior', () => {
assert.ok($content.eq(1).hasClass('dx-drawer-content'));
});

QUnit.skip('drawer panel should be repositioned correctly after dimension changed,left position', function(assert) {
QUnit.test('drawer panel should be repositioned correctly after dimension changed,left position', function(assert) {
fx.off = true;

const $element = $('#drawer').dxDrawer({
Expand All @@ -611,12 +611,12 @@ QUnit.module('Drawer behavior', () => {

resizeCallbacks.fire();

assert.equal($panelOverlayContent.position().left, 0, 'panel overlay content position is OK');
assert.equal($panelOverlayContent.position().left, -200, 'panel overlay content position is OK');

fx.off = false;
});

QUnit.skip('drawer panel should be repositioned correctly after dimension changed,top position', function(assert) {
QUnit.test('drawer panel should be repositioned correctly after dimension changed,top position', function(assert) {
fx.off = true;

const $element = $('#drawer').dxDrawer({
Expand All @@ -636,7 +636,7 @@ QUnit.module('Drawer behavior', () => {

resizeCallbacks.fire();

assert.equal($panelOverlayContent.position().top, 0, 'panel overlay content position is OK');
assert.equal($panelOverlayContent.position().top, -600, 'panel overlay content position is OK');

fx.off = false;
});
Expand Down Expand Up @@ -694,7 +694,7 @@ QUnit.module('Drawer behavior', () => {
fx.off = false;
});

QUnit.skip('drawer panel should be repositioned after dimension changed, right position', function(assert) {
QUnit.test('drawer panel should be repositioned after dimension changed, right position', function(assert) {
fx.off = true;

const $element = $('#drawer').dxDrawer({
Expand All @@ -714,7 +714,7 @@ QUnit.module('Drawer behavior', () => {

resizeCallbacks.fire();

assert.equal($panelOverlayContent.position().left, -200, 'panel overlay content position is OK');
assert.equal($panelOverlayContent.position().left, 1000, 'panel overlay content position is OK');

fx.off = false;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3786,35 +3786,6 @@ QUnit.module('Nested Splitters', moduleConfig, () => {
assert.strictEqual(nestedSplitterResizeHandlerStub.callCount, 1);
});

QUnit.skip(`nestedSplitter.${eventHandler} event handler should be able to be updated at runtime`, function(assert) {
const handlerStub = sinon.stub();
const handlerStubAfterUpdate = sinon.stub();

this.reinit({
items: [{
splitter: {
[eventHandler]: handlerStub,
dataSource: [{ text: 'Pane_1' }, { text: 'Pane_2' }]
}
}]
});

let pointer = pointerMock(this.getResizeHandles(false).get(0));

pointer.start().dragStart().drag(0, 50).dragEnd();

assert.strictEqual(handlerStub.callCount, 1);
assert.strictEqual(handlerStubAfterUpdate.callCount, 0);
handlerStub.reset();

this.instance.option(`items[0].splitter.${eventHandler}`, handlerStubAfterUpdate);

pointer = pointerMock(this.getResizeHandles(false)[0]);
pointer.start().dragStart().drag(0, 50).dragEnd();

assert.strictEqual(handlerStub.callCount, 0);
assert.strictEqual(handlerStubAfterUpdate.callCount, 1);
});
});

QUnit.test('itemRendered callback should be called when the panes of a nested splitter are rendered', function(assert) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,24 +298,6 @@ QUnit.module('repaintChangesOnly', {
this.checkContainsEmptyMessage(assert, false);
});

QUnit.skip('[{1, text: 1a, content: 1a_}, {2}] -> [{1, text: 1aupd, content: 1a_}, {2}]' + testContext, function(assert) {
const item1 = { text: '1a', content: '1a_' };
const item2 = { text: '2a', content: '2a_' };
this.createTabPanel({ items: [item1, item2] });

const item1_ = { text: '1aupd', content: '1a_' };
this.tabPanel.option(dataSourcePropertyName, [item1_, item2]);
this.clock.tick(1);

this.checkTitleRendered(assert, [item1_]);
this.checkItemRendered(assert, [{ data: item1_, index: 0 }]);
this.checkItemDeleted(assert, []);

this.checkContainsElements(assert, [item1_.text, item1_.content, item2.text]);
this.checkNotContainsElements(assert, ['1a', item2.content]);
this.checkContainsEmptyMessage(assert, false);
});

QUnit.test('[{1, text: 1a, content: 1a_}, {2}] -> [{1, text: 1aupd, content: 1a_}, {2}] via items[0]' + testContext, function(assert) {
if(dataSourcePropertyName === 'dataSource') {
assert.ok(true, 'Not supported for dataSource');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,6 @@ QUnit.test('encodeHtml', function(assert) {
}], 'renderer animation options');
});

QUnit.skip('Option from the invalidating list', function(assert) {
this.createWidget();
const spy = sinon.spy(this.widget, '_invalidate');
this.widget._invalidatingOptions = ['test-option'];

this.widget.option('test-option', 'test-value');

assert.deepEqual(spy.lastCall.args, []);
});

QUnit.test('Unknown option', function(assert) {
this.createWidget();
const spy = sinon.spy(this.widget, '_invalidate');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,17 +704,6 @@ $.each([null, [-180, 90, 180, -20], [-50, 90, 180, -90], [-180, 20, 180, -90], [
assert.arraysEqual(this.projection2.getViewport(), this.projection1.getViewport());
});

QUnit.skip('Northern edge - to viewport' + namePart, function(assert) {
this.setBounds(bounds);

this.projection1.setZoom(2).setCenter([0, 80]);

this.projection2.setViewport(this.projection1.getViewport());

assert.roughEqual(this.projection2.getZoom(), this.projection1.getZoom(), 1E-8, 'zoom');
assert.arraysEqual(this.projection2.getCenter(), this.projection1.getCenter(), 'center');
});

QUnit.test('Northern edge - from viewport' + namePart, function(assert) {
this.setBounds(bounds);

Expand All @@ -726,10 +715,11 @@ $.each([null, [-180, 90, 180, -20], [-50, 90, 180, -90], [-180, 20, 180, -90], [
assert.arraysEqual(this.projection2.getViewport(), this.projection1.getViewport());
});

QUnit.skip('Eastern edge - to viewport' + namePart, function(assert) {
QUnit.test('Eastern edge - to viewport' + namePart, function(assert) {
this.setBounds(bounds);

this.projection1.setZoom(1.75).setCenter([170, 15]);
this.projection1.setZoom(1.75);
this.projection1.setCenter([170, 15]);

this.projection2.setViewport(this.projection1.getViewport());

Expand All @@ -748,15 +738,19 @@ $.each([null, [-180, 90, 180, -20], [-50, 90, 180, -90], [-180, 20, 180, -90], [
assert.arraysEqual(this.projection2.getViewport(), this.projection1.getViewport());
});

QUnit.skip('Southern edge - to viewport' + namePart, function(assert) {
QUnit.test('Southern edge - to viewport' + namePart, function(assert) {
this.setBounds(bounds);

this.projection1.setZoom(2.3).setCenter([50, -75]);
this.projection1.setZoom(2.3);
this.projection1.setCenter([50, -75]);

this.projection2.setViewport(this.projection1.getViewport());

assert.roughEqual(this.projection2.getZoom(), this.projection1.getZoom(), 1E-8, 'zoom');
assert.arraysEqual(this.projection2.getCenter(), this.projection1.getCenter(), 'center');

if(bounds) {
assert.arraysEqual(this.projection2.getCenter(), this.projection1.getCenter(), 'center');
}
});

QUnit.test('Southern edge - from viewport' + namePart, function(assert) {
Expand All @@ -770,10 +764,11 @@ $.each([null, [-180, 90, 180, -20], [-50, 90, 180, -90], [-180, 20, 180, -90], [
assert.arraysEqual(this.projection2.getViewport(), this.projection1.getViewport());
});

QUnit.skip('Western edge - to viewport' + namePart, function(assert) {
QUnit.test('Western edge - to viewport' + namePart, function(assert) {
this.setBounds(bounds);

this.projection1.setZoom(4.75).setCenter([-160, -10]);
this.projection1.setZoom(4.75);
this.projection1.setCenter([-160, -10]);

this.projection2.setViewport(this.projection1.getViewport());

Expand Down
Loading