Skip to content

Commit 674ebcd

Browse files
crisbetojelbourn
authored andcommitted
chore(select): fix flaky positioning test (#12496)
Fixes a flaky test that is failing on iOS.
1 parent 8cbe812 commit 674ebcd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/lib/select/select.spec.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -3318,7 +3318,8 @@ describe('MatSelect', () => {
33183318

33193319
let panelLeft = document.querySelector('.mat-select-panel')!.getBoundingClientRect().left;
33203320

3321-
expect(panelLeft).toBeGreaterThan(0, `Expected select panel to be inside the viewport.`);
3321+
expect(panelLeft)
3322+
.toBeGreaterThanOrEqual(0, `Expected select panel to be inside the viewport.`);
33223323

33233324
fixture.componentInstance.select.close();
33243325
fixture.detectChanges();
@@ -3330,7 +3331,7 @@ describe('MatSelect', () => {
33303331

33313332
panelLeft = document.querySelector('.mat-select-panel')!.getBoundingClientRect().left;
33323333

3333-
expect(panelLeft).toBeGreaterThan(0,
3334+
expect(panelLeft).toBeGreaterThanOrEqual(0,
33343335
`Expected select panel continue being inside the viewport.`);
33353336
}));
33363337
});

0 commit comments

Comments
 (0)