Skip to content

Commit

Permalink
Add tests that are with displayTimeOffset different from 0, so that t…
Browse files Browse the repository at this point in the history
…ests fail on travis CI.

IgniteUI#1109
  • Loading branch information
Lipata committed Sep 4, 2017
1 parent 3dc2a2b commit 1bb6314
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions tests/unit/editors/datePicker/tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@
$editor.trigger("blur").remove();
});
var testId = 'displayTimeOffset enabled and setting date from drop down calendar';
test(testId, 3, function () {
test(testId, 6, function () {
var $editor, $ddButton, $input;

$editor = $('<input/>').appendTo("#testBedContainer").igDatePicker({
Expand All @@ -1151,7 +1151,29 @@
$ddButton.click();
$(".ui-datepicker-current-day").next().click();
$input.blur();
equal($editor.igDatePicker("displayValue"), "12/8/2017 12:00 AM", "Display value is not correct");
equal($editor.igDatePicker("displayValue"), "12/9/2017 12:00 AM", "Display value is not correct");
$editor.remove();

$editor = $('<input/>').appendTo("#testBedContainer").igDatePicker({
value: new Date("2017-12-08T00:00:00.000Z"),
dataMode: "date",
dateDisplayFormat: "dateTime",
enableUTCDates: true,
displayTimeOffset: 240,
dropDownAnimationDuration: 1
});
$ddButton = $editor.igDatePicker("dropDownButton");
$input = $editor.igDatePicker("field");

equal($editor.igDatePicker("displayValue"), "12/8/2017 4:00 AM", "Display value is not correct");
$ddButton.click();
$ddButton.click();
$input.blur();
equal($editor.igDatePicker("displayValue"), "12/8/2017 4:00 AM", "Display value is not correct");
$ddButton.click();
$(".ui-datepicker-current-day").next().click();
$input.blur();
equal($editor.igDatePicker("displayValue"), "12/9/2017 4:00 AM", "Display value is not correct");
$editor.remove();
});
});
Expand Down

0 comments on commit 1bb6314

Please sign in to comment.