From 4285398a40997fdf3b84a44013f1a40033769b13 Mon Sep 17 00:00:00 2001 From: BingoRUS Date: Thu, 22 Mar 2018 17:58:35 +0300 Subject: [PATCH] Release 17.2.7 Cherry-picked changesets: de0d62e Ksenia Mordalyuk - Fix test for PST in dxScheduler (#3337) --- .../integration.workSpace.tests.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js b/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js index 8541b46408d6..b45affa5390d 100644 --- a/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js +++ b/testing/tests/DevExpress.ui.widgets.scheduler/integration.workSpace.tests.js @@ -1285,24 +1285,26 @@ QUnit.test("Timepanel text should be calculated correctly if DST makes sense (T4 }); QUnit.test("DateTimeIndicator should show correct time in current time zone", function(assert) { + var currentDate = new Date(2018, 1, 4); + this.createInstance({ dataSource: [], views: ["week"], currentView: "week", cellDuration: 60, showCurrentTimeIndicator: true, - currentDate: new Date(2018, 3, 4), - indicatorTime: new Date(2018, 3, 4, 9, 30), + currentDate: currentDate, + indicatorTime: new Date(2018, 1, 4, 9, 30), height: 600 }); var indicatorPositionBefore = this.instance.$element().find(".dx-scheduler-date-time-indicator").position(), cellHeight = $(this.instance.$element()).find(".dx-scheduler-date-table td").eq(0).outerHeight(); - this.instance.option("timeZone", "America/Dominica"); + this.instance.option("timeZone", "Europe/Berlin"); var indicatorPositionAfter = this.instance.$element().find(".dx-scheduler-date-time-indicator").position(), - tzDiff = this.instance.fire("getClientTimezoneOffset") / 3600000 + this.instance.fire("getTimezone"); + tzDiff = this.instance.fire("getClientTimezoneOffset", currentDate) / 3600000 + this.instance.fire("getTimezone"); assert.equal(indicatorPositionAfter.top, indicatorPositionBefore.top + cellHeight * tzDiff, "indicator has correct position"); });