diff --git a/src/sap.m/src/sap/m/TimePickerSliders.js b/src/sap.m/src/sap/m/TimePickerSliders.js index 83eacbd013ec..eba0523a973a 100644 --- a/src/sap.m/src/sap/m/TimePickerSliders.js +++ b/src/sap.m/src/sap/m/TimePickerSliders.js @@ -197,7 +197,7 @@ sap.ui.define([ this.$().on('selectstart', fnFalse); - if (!Device.browser.msie && this._getShouldOpenSliderAfterRendering()) { + if (this._getShouldOpenSliderAfterRendering()) { /* This method is called here prematurely to ensure slider loading on time. * Make sure _the browser native focus_ is not actually set on the early call (the "true" param) * because that fires events and results in unexpected behaviors */ diff --git a/src/sap.m/test/sap/m/qunit/DateTimePicker.qunit.js b/src/sap.m/test/sap/m/qunit/DateTimePicker.qunit.js index f52d19f45b44..506c86616d4d 100755 --- a/src/sap.m/test/sap/m/qunit/DateTimePicker.qunit.js +++ b/src/sap.m/test/sap/m/qunit/DateTimePicker.qunit.js @@ -174,18 +174,22 @@ sap.ui.define([ QUnit.test("Time sliders are updated right after popup is open", function(assert) { var done = assert.async(); //Prepare - var oDTP = new DateTimePicker().placeAt("uiArea1"); + var oDTP = new DateTimePicker().placeAt("uiArea1"), + oTPS, + oSpyUpdateSlidersFn; sap.ui.getCore().applyChanges(); oDTP._createPopup(); oDTP._createPopupContent(); - var oSpyUpdateSlidersFn = sinon.spy(oDTP._oPopup.getContent()[0].getTimeSliders(), "_updateSlidersValues"); + oTPS = oDTP._oPopup.getContent()[0].getTimeSliders(); + oSpyUpdateSlidersFn = sinon.spy(oTPS, "_updateSlidersValues"); //Act oDTP._openPopup(); setTimeout(function() { //Assert assert.equal(oSpyUpdateSlidersFn.callCount, 1, "Once picker is opened, function updateSlidersValues should be called"); + assert.ok(oTPS._getFirstSlider().getIsExpanded(), "Once picker is opened, the first slider is expanded"); //Cleanup oSpyUpdateSlidersFn.restore(); diff --git a/src/sap.m/test/sap/m/qunit/TimePickerSliders.qunit.js b/src/sap.m/test/sap/m/qunit/TimePickerSliders.qunit.js index f38561355909..97035b2bcf3e 100755 --- a/src/sap.m/test/sap/m/qunit/TimePickerSliders.qunit.js +++ b/src/sap.m/test/sap/m/qunit/TimePickerSliders.qunit.js @@ -210,15 +210,12 @@ sap.ui.define([ }); QUnit.test("Call to collapseAll should close all sliders", function (assert) { - var aSliders = []; - aSliders = this.oTPS.getAggregation("_columns"); + var aSliders = this.oTPS.getAggregation("_columns"); aSliders[0].setIsExpanded(true); this.oTPS.collapseAll(); sap.ui.getCore().applyChanges(); - aSliders = this.oTPS.getAggregation("_columns"); - aSliders.forEach(function (oSlider, index) { assert.equal(oSlider.getIsExpanded(), false, "slider " + index + " is not expanded"); });