Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit abe6acf

Browse files
authored
test(input): fix date type tests with max + timezone
Closes #16526
1 parent f04e04e commit abe6acf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/ng/directive/inputSpec.js

+12
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,9 @@ describe('input', function() {
853853
});
854854

855855
it('should validate when timezone is provided.', function() {
856+
// We cannot use the default element
857+
dealoc(inputElm);
858+
856859
inputElm = helper.compileInput('<input type="month" ng-model="value" name="alias" ' +
857860
'max="{{ maxVal }}" ng-model-options="{timezone: \'UTC\', allowInvalid: true}"/>');
858861
$rootScope.maxVal = '2013-01';
@@ -1127,6 +1130,9 @@ describe('input', function() {
11271130
});
11281131

11291132
it('should validate when timezone is provided.', function() {
1133+
// We cannot use the default element
1134+
dealoc(inputElm);
1135+
11301136
inputElm = helper.compileInput('<input type="week" ng-model="value" name="alias" ' +
11311137
'max="{{ maxVal }}" ng-model-options="{timezone: \'-2400\', allowInvalid: true}"/>');
11321138
// The calendar week comparison date is January 17. Setting the timezone to -2400
@@ -1434,6 +1440,9 @@ describe('input', function() {
14341440
});
14351441

14361442
it('should validate when timezone is provided.', function() {
1443+
// We cannot use the default element
1444+
dealoc(inputElm);
1445+
14371446
inputElm = helper.compileInput('<input type="datetime-local" ng-model="value" name="alias" ' +
14381447
'max="{{ maxVal }}" ng-model-options="{timezone: \'UTC\', allowInvalid: true}"/>');
14391448
$rootScope.maxVal = '2013-01-01T00:00:00';
@@ -1788,6 +1797,9 @@ describe('input', function() {
17881797
});
17891798

17901799
it('should validate when timezone is provided.', function() {
1800+
// We cannot use the default element
1801+
dealoc(inputElm);
1802+
17911803
inputElm = helper.compileInput('<input type="time" ng-model="value" name="alias" ' +
17921804
'max="{{ maxVal }}" ng-model-options="{timezone: \'UTC\', allowInvalid: true}"/>');
17931805
$rootScope.maxVal = '22:30:00';

0 commit comments

Comments
 (0)