@@ -1507,6 +1507,15 @@ describe('MatSelect', () => {
1507
1507
// Scroll the select into view
1508
1508
setScrollTop ( 1700 ) ;
1509
1509
1510
+ // In the iOS simulator (BrowserStack & SauceLabs), adding the content to the
1511
+ // body causes karma's iframe for the test to stretch to fit that content once we attempt to
1512
+ // scroll the page. Setting width / height / maxWidth / maxHeight on the iframe does not
1513
+ // successfully constrain its size. As such, skip assertions in environments where the
1514
+ // window size has changed since the start of the test.
1515
+ if ( window . innerHeight > startingWindowHeight ) {
1516
+ return ;
1517
+ }
1518
+
1510
1519
trigger . click ( ) ;
1511
1520
fixture . detectChanges ( ) ;
1512
1521
@@ -1526,6 +1535,15 @@ describe('MatSelect', () => {
1526
1535
// Scroll the select into view
1527
1536
setScrollTop ( 1700 ) ;
1528
1537
1538
+ // In the iOS simulator (BrowserStack & SauceLabs), adding the content to the
1539
+ // body causes karma's iframe for the test to stretch to fit that content once we attempt to
1540
+ // scroll the page. Setting width / height / maxWidth / maxHeight on the iframe does not
1541
+ // successfully constrain its size. As such, skip assertions in environments where the
1542
+ // window size has changed since the start of the test.
1543
+ if ( window . innerHeight > startingWindowHeight ) {
1544
+ return ;
1545
+ }
1546
+
1529
1547
trigger . click ( ) ;
1530
1548
fixture . detectChanges ( ) ;
1531
1549
@@ -1598,6 +1616,15 @@ describe('MatSelect', () => {
1598
1616
// Scroll the select so that it has insufficient space to open above the trigger
1599
1617
setScrollTop ( 1950 ) ;
1600
1618
1619
+ // In the iOS simulator (BrowserStack & SauceLabs), adding the content to the
1620
+ // body causes karma's iframe for the test to stretch to fit that content once we attempt to
1621
+ // scroll the page. Setting width / height / maxWidth / maxHeight on the iframe does not
1622
+ // successfully constrain its size. As such, skip assertions in environments where the
1623
+ // window size has changed since the start of the test.
1624
+ if ( window . innerHeight > startingWindowHeight ) {
1625
+ return ;
1626
+ }
1627
+
1601
1628
trigger . click ( ) ;
1602
1629
fixture . detectChanges ( ) ;
1603
1630
0 commit comments