diff --git a/testing/tests/DevExpress.ui.widgets.editors/lookup.markup.tests.js b/testing/tests/DevExpress.ui.widgets.editors/lookup.markup.tests.js index a12e6fb4c3fb..1e08775b5d81 100644 --- a/testing/tests/DevExpress.ui.widgets.editors/lookup.markup.tests.js +++ b/testing/tests/DevExpress.ui.widgets.editors/lookup.markup.tests.js @@ -31,7 +31,7 @@ module('Lookup', { this.clock = sinon.useFakeTimers(); this.element = $('#lookup'); - this.instance = this.element.dxLookup({ fullScreen: false }).dxLookup('instance'); + this.instance = this.element.dxLookup({ 'dropDownOptions.fullScreen': false }).dxLookup('instance'); this.$field = $(this.instance._$field); }, afterEach: function() { diff --git a/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js b/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js index 91e07958d347..b3564dcb2fd3 100644 --- a/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js +++ b/testing/tests/DevExpress.ui.widgets.editors/lookup.tests.js @@ -91,7 +91,7 @@ QUnit.module('Lookup', { this.clock = sinon.useFakeTimers(); this.element = $('#lookup'); - this.instance = this.element.dxLookup({ fullScreen: false }).dxLookup('instance'); + this.instance = this.element.dxLookup({ 'dropDownOptions.fullScreen': false }).dxLookup('instance'); this.$field = $(this.instance._$field); this.togglePopup = function() { @@ -239,7 +239,7 @@ QUnit.module('Lookup', { }, deferRendering: false, searchTimeout: 0, - animation: {}, + 'dropDownOptions.animation': {}, cleanSearchOnOpening: false }).dxLookup('instance'); count = 0; @@ -273,7 +273,7 @@ QUnit.module('Lookup', { dataSource: [1, 2, 3], deferRendering: false, searchTimeout: searchTimeout, - animation: null, + 'dropDownOptions.animation': null, cleanSearchOnOpening: true, opened: true }).dxLookup('instance'); @@ -296,7 +296,7 @@ QUnit.module('Lookup', { } }), searchTimeout: searchTimeout, - animation: null, + 'dropDownOptions.animation': null, cleanSearchOnOpening: true, opened: true }).dxLookup('instance'); @@ -318,7 +318,7 @@ QUnit.module('Lookup', { .dxLookup({ items: [111, 222, 333], searchTimeout: 0, - animation: {}, + 'dropDownOptions.animation': {}, minSearchLength: 2, onContentReady: function() { count++; } }).dxLookup('instance'); @@ -1112,7 +1112,7 @@ QUnit.module('Lookup', { const popupHeight = 500; this.instance.option({ usePopover: true, - popupHeight: popupHeight + 'dropDownOptions.height': popupHeight }); this.togglePopup(); @@ -1381,7 +1381,11 @@ QUnit.module('Lookup', { try { const lookup = $lookup - .dxLookup({ dataSource: ['blue', 'orange', 'lime', 'purple'], value: 'orange', fullScreen: true }) + .dxLookup({ + dataSource: ['blue', 'orange', 'lime', 'purple'], + value: 'orange', + 'dropDownOptions.fullScreen': true + }) .dxLookup('instance'); $(lookup.field()).trigger('dxclick'); @@ -1428,7 +1432,7 @@ QUnit.module('Lookup', { displayExpr: 'Name', valueExpr: 'ID', value: 1, - title: 'Select employee' + 'dropDownOptions.title': 'Select employee' }); setTimeout(() => { @@ -1482,7 +1486,7 @@ QUnit.module('options', { }, () => { QUnit.test('popupWidth', function(assert) { const instance = $('#lookup').dxLookup({ - popupWidth: 100, + 'dropDownOptions.width': 100, usePopover: false }).dxLookup('instance'); @@ -1490,13 +1494,13 @@ QUnit.module('options', { assert.equal(instance._popup.option('width'), 100, 'Option initialized correctly'); - instance.option('popupWidth', 200); + instance.option('dropDownOptions.width', 200); assert.equal(instance._popup.option('width'), 200, 'Option set correctly'); }); QUnit.test('popupWidth option test for usePopover mode', function(assert) { const instance = $('#lookup').dxLookup({ - popupWidth: 100, + 'dropDownOptions.width': 100, usePopover: true }).dxLookup('instance'); @@ -1504,7 +1508,7 @@ QUnit.module('options', { assert.equal(instance._popup.option('width'), 100, 'Option initialized correctly'); - instance.option('popupWidth', 200); + instance.option('dropDownOptions.width', 200); assert.equal(instance._popup.option('width'), 200, 'Option set correctly'); }); @@ -1534,9 +1538,9 @@ QUnit.module('options', { initialValue = initialValue(); } - instance.option('popupWidth', initialValue + 1); + instance.option('dropDownOptions.width', initialValue + 1); - instance.option('popupWidth', 'auto'); + instance.option('dropDownOptions.width', 'auto'); let autoValue = popup.option('width'); if($.isFunction(autoValue)) { autoValue = autoValue(); @@ -1546,13 +1550,13 @@ QUnit.module('options', { }); QUnit.test('popupHeight', function(assert) { - const instance = $('#lookup').dxLookup({ popupHeight: 100, usePopover: false }).dxLookup('instance'); + const instance = $('#lookup').dxLookup({ 'dropDownOptions.height': 100, usePopover: false }).dxLookup('instance'); $(instance._$field).trigger('dxclick'); assert.equal(instance._popup.option('height'), 100, 'Option initialized correctly'); - instance.option('popupHeight', 200); + instance.option('dropDownOptions.height', 200); assert.equal(instance._popup.option('height'), 200, 'Option set correctly'); }); @@ -1568,9 +1572,9 @@ QUnit.module('options', { initialValue = initialValue(); } - instance.option('popupHeight', initialValue + 1); + instance.option('dropDownOptions.height', initialValue + 1); - instance.option('popupHeight', 'auto'); + instance.option('dropDownOptions.height', 'auto'); let autoValue = popup.option('height'); if($.isFunction(autoValue)) { autoValue = autoValue(); @@ -1866,21 +1870,21 @@ QUnit.module('options', { QUnit.test('title', function(assert) { const instance = $('#lookup').dxLookup({ dataSource: [], - title: 'title' + 'dropDownOptions.title': 'title' }).dxLookup('instance'); $(instance._$field).trigger('dxclick'); assert.equal(instance._popup.option('title'), 'title', 'title sets to popup correctly on init'); - instance.option('title', 'title2'); + instance.option('dropDownOptions.title', 'title2'); assert.equal(instance._popup.option('title'), 'title2', 'title sets to popup correctly on change'); }); QUnit.test('fullScreen', function(assert) { const instance = $('#lookup').dxLookup({ dataSource: [], - fullScreen: true, + 'dropDownOptions.fullScreen': true, usePopover: false }).dxLookup('instance'); @@ -1891,7 +1895,7 @@ QUnit.module('options', { popup = instance._popup; assert.equal(popup.option('fullScreen'), true, 'fullScreen sets to popup correctly on init'); - instance.option('fullScreen', false); + instance.option('dropDownOptions.fullScreen', false); $(instance._$field).trigger('dxclick'); popup = instance._popup; assert.equal(popup.option('fullScreen'), false, 'fullScreen sets to popup correctly on change'); @@ -2035,7 +2039,7 @@ QUnit.module('popup options', { const $lookup = $('#lookupOptions'); const instance = $lookup.dxLookup({ - shading: true, + 'dropDownOptions.shading': true, visible: true, usePopover: false }).dxLookup('instance'); @@ -2045,7 +2049,7 @@ QUnit.module('popup options', { assert.ok($wrapper.hasClass(OVERLAY_SHADER_CLASS)); - instance.option('shading', false); + instance.option('dropDownOptions.shading', false); assert.ok(!$wrapper.hasClass(OVERLAY_SHADER_CLASS)); }); @@ -2066,7 +2070,7 @@ QUnit.module('popup options', { QUnit.test('lookup popup should be hidden after click outside was present', function(assert) { const $lookup = $('#lookupOptions'); const instance = $lookup.dxLookup({ - closeOnOutsideClick: true, + 'dropDownOptions.closeOnOutsideClick': true, visible: true, usePopover: false }).dxLookup('instance'); @@ -2084,7 +2088,7 @@ QUnit.module('popup options', { QUnit.test('custom titleTemplate option', function(assert) { const $lookup = $('#lookupOptions').dxLookup({ - titleTemplate: 'customTitle', + 'dropDownOptions.titleTemplate': 'customTitle', visible: true, showCancelButton: false }); @@ -2098,7 +2102,7 @@ QUnit.module('popup options', { QUnit.test('custom titleTemplate option is set correctly on init', function(assert) { const $lookup = $('#lookupOptions').dxLookup({ - titleTemplate: function(titleElement) { + 'dropDownOptions.titleTemplate': function(titleElement) { assert.equal(isRenderer(titleElement), !!config().useJQuery, 'titleElement is correct'); let result = '