chore(select): fix flaky positioning test (#12496)

Fixes a flaky test that is failing on iOS.
This commit is contained in:
Kristiyan Kostadinov
2018-08-03 01:44:00 +02:00
committed by Jeremy Elbourn
parent 8cbe8122c0
commit 674ebcd925
+3 -2
View File
@@ -3318,7 +3318,8 @@ describe('MatSelect', () => {
let panelLeft = document.querySelector('.mat-select-panel')!.getBoundingClientRect().left;
expect(panelLeft).toBeGreaterThan(0, `Expected select panel to be inside the viewport.`);
expect(panelLeft)
.toBeGreaterThanOrEqual(0, `Expected select panel to be inside the viewport.`);
fixture.componentInstance.select.close();
fixture.detectChanges();
@@ -3330,7 +3331,7 @@ describe('MatSelect', () => {
panelLeft = document.querySelector('.mat-select-panel')!.getBoundingClientRect().left;
expect(panelLeft).toBeGreaterThan(0,
expect(panelLeft).toBeGreaterThanOrEqual(0,
`Expected select panel continue being inside the viewport.`);
}));
});