Skip to content

Commit 125a112

Browse files
committed
fixup! remove platform check
1 parent 4f1e2f4 commit 125a112

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

src/components-examples/material/tooltip/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ ng_module(
1111
]),
1212
module_name = "@angular/components-examples/material/tooltip",
1313
deps = [
14-
"//src/cdk/platform",
1514
"//src/cdk/scrolling",
1615
"//src/cdk/testing",
1716
"//src/cdk/testing/testbed",

src/components-examples/material/tooltip/tooltip-harness/tooltip-harness-example.spec.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ import {BrowserDynamicTestingModule, platformBrowserDynamicTesting}
66
from '@angular/platform-browser-dynamic/testing';
77
import {MatTooltipModule} from '@angular/material/tooltip';
88
import {TooltipHarnessExample} from './tooltip-harness-example';
9-
import {Platform} from '@angular/cdk/platform';
109
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
1110

1211
describe('TooltipHarnessExample', () => {
1312
let fixture: ComponentFixture<TooltipHarnessExample>;
1413
let loader: HarnessLoader;
15-
let isSupported: boolean;
1614

1715
beforeAll(() => {
1816
TestBed.initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
@@ -27,36 +25,22 @@ describe('TooltipHarnessExample', () => {
2725
fixture = TestBed.createComponent(TooltipHarnessExample);
2826
fixture.detectChanges();
2927
loader = TestbedHarnessEnvironment.loader(fixture);
30-
const platform = TestBed.inject(Platform);
31-
isSupported = !platform.IOS && !platform.ANDROID;
3228
})
3329
);
3430

3531
it('should load all tooltip harnesses', async () => {
36-
if (!isSupported) {
37-
return;
38-
}
39-
4032
const tooltips = await loader.getAllHarnesses(MatTooltipHarness);
4133
expect(tooltips.length).toBe(2);
4234
});
4335

4436
it('should be able to show a tooltip', async () => {
45-
if (!isSupported) {
46-
return;
47-
}
48-
4937
const tooltip = await loader.getHarness(MatTooltipHarness.with({selector: '#one'}));
5038
expect(await tooltip.isOpen()).toBe(false);
5139
await tooltip.show();
5240
expect(await tooltip.isOpen()).toBe(true);
5341
});
5442

5543
it('should be able to hide a tooltip', async () => {
56-
if (!isSupported) {
57-
return;
58-
}
59-
6044
const tooltip = await loader.getHarness(MatTooltipHarness.with({selector: '#one'}));
6145
expect(await tooltip.isOpen()).toBe(false);
6246
await tooltip.show();
@@ -66,20 +50,12 @@ describe('TooltipHarnessExample', () => {
6650
});
6751

6852
it('should be able to get the text of a tooltip', async () => {
69-
if (!isSupported) {
70-
return;
71-
}
72-
7353
const tooltip = await loader.getHarness(MatTooltipHarness.with({selector: '#one'}));
7454
await tooltip.show();
7555
expect(await tooltip.getTooltipText()).toBe('Tooltip message');
7656
});
7757

7858
it('should return empty when getting the tooltip text while closed', async () => {
79-
if (!isSupported) {
80-
return;
81-
}
82-
8359
const tooltip = await loader.getHarness(MatTooltipHarness.with({selector: '#one'}));
8460
expect(await tooltip.getTooltipText()).toBe('');
8561
});

0 commit comments

Comments
 (0)