Skip to content

Commit 8987153

Browse files
committed
test(MdInput): Skip empty check tests for IE11
1 parent 4cdac2b commit 8987153

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/components/input/input.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ import {
1212
MD_INPUT_DIRECTIVES,
1313
} from './input';
1414

15+
function isInternetExplorer11() {
16+
return !(window.ActiveXObject) && "ActiveXObject" in window
17+
}
18+
1519

1620
describe('MdInput', function () {
1721
var builder: TestComponentBuilder;
@@ -36,6 +40,9 @@ describe('MdInput', function () {
3640
}));
3741

3842
it('should not be treated as empty if type is date', async(() => {
43+
if (isInternetExplorer11()) {
44+
return;
45+
}
3946
builder.createAsync(MdInputDateTestController)
4047
.then(fixture => {
4148
fixture.componentInstance.placeholder = 'Placeholder';
@@ -48,6 +55,9 @@ describe('MdInput', function () {
4855
}));
4956

5057
it('should treat text input type as empty at init', async(() => {
58+
if (isInternetExplorer11()) {
59+
return;
60+
}
5161
builder.createAsync(MdInputTextTestController)
5262
.then(fixture => {
5363
fixture.componentInstance.placeholder = 'Placeholder';
@@ -60,6 +70,9 @@ describe('MdInput', function () {
6070
}));
6171

6272
it('should treat password input type as empty at init', async(() => {
73+
if (isInternetExplorer11()) {
74+
return;
75+
}
6376
builder.createAsync(MdInputPasswordTestController)
6477
.then(fixture => {
6578
fixture.componentInstance.placeholder = 'Placeholder';
@@ -72,6 +85,9 @@ describe('MdInput', function () {
7285
}));
7386

7487
it('should treat number input type as empty at init', async(() => {
88+
if (isInternetExplorer11()) {
89+
return;
90+
}
7591
builder.createAsync(MdInputNumberTestController)
7692
.then(fixture => {
7793
fixture.componentInstance.placeholder = 'Placeholder';

0 commit comments

Comments
 (0)