@@ -31,7 +31,7 @@ import {
31
31
} from '../core/placeholder/placeholder-options' ;
32
32
33
33
34
- describe ( 'MdSelect' , ( ) => {
34
+ fdescribe ( 'MdSelect' , ( ) => {
35
35
let overlayContainerElement : HTMLElement ;
36
36
let dir : { value : 'ltr' | 'rtl' } ;
37
37
let scrolledSubject = new Subject ( ) ;
@@ -1319,15 +1319,23 @@ describe('MdSelect', () => {
1319
1319
describe ( 'x-axis positioning' , ( ) => {
1320
1320
1321
1321
beforeEach ( ( ) => {
1322
+ < < < << << HEAD
1322
1323
select . style . position = 'fixed' ;
1323
1324
select . style . left = '30px' ;
1324
1325
} ) ;
1325
1326
1326
1327
it ( 'should align the trigger and the selected option on the x-axis in ltr' , fakeAsync ( ( ) => {
1328
+ = === ===
1329
+ select . style . marginLeft = select . style . marginRight = '50px' ;
1330
+ } ) ;
1331
+
1332
+ it ( 'should align the trigger and the selected option on the x-axis in ltr' , async ( ( ) => {
1333
+ > >>> >>> chore: try to fix edge tests
1327
1334
trigger . click ( ) ;
1328
1335
tick ( 400 ) ;
1329
1336
fixture . detectChanges ( ) ;
1330
1337
1338
+ < < < << << HEAD
1331
1339
const triggerLeft = trigger . getBoundingClientRect ( ) . left ;
1332
1340
const firstOptionLeft = document . querySelector ( '.cdk-overlay-pane md-option' )
1333
1341
. getBoundingClientRect ( ) . left ;
@@ -1339,13 +1347,30 @@ describe('MdSelect', () => {
1339
1347
} ) ) ;
1340
1348
1341
1349
it ( 'should align the trigger and the selected option on the x-axis in rtl' , fakeAsync ( ( ) => {
1350
+ = === ===
1351
+ fixture . whenStable ( ) . then ( ( ) => {
1352
+ const triggerLeft = trigger . getBoundingClientRect ( ) . left ;
1353
+ const firstOptionLeft =
1354
+ document . querySelector ( '.cdk-overlay-pane md-option' ) . getBoundingClientRect ( ) . left ;
1355
+
1356
+ // Each option is 32px wider than the trigger, so it must be adjusted 16px
1357
+ // to ensure the text overlaps correctly.
1358
+ expect ( firstOptionLeft . toFixed ( 2 ) )
1359
+ . toEqual ( ( triggerLeft - 16 ) . toFixed ( 2 ) ,
1360
+ `Expected trigger to align with the selected option on the x-axis in LTR.` ) ;
1361
+ } ) ;
1362
+ } ) ) ;
1363
+
1364
+ it ( 'should align the trigger and the selected option on the x-axis in rtl' , async ( ( ) => {
1365
+ > >>> >>> chore: try to fix edge tests
1342
1366
dir . value = 'rtl' ;
1343
1367
fixture . detectChanges ( ) ;
1344
1368
1345
1369
trigger . click ( ) ;
1346
1370
tick ( 400 ) ;
1347
1371
fixture . detectChanges ( ) ;
1348
1372
1373
+ < < < << << HEAD
1349
1374
const triggerRight = trigger . getBoundingClientRect ( ) . right ;
1350
1375
const firstOptionRight =
1351
1376
document . querySelector ( '.cdk-overlay-pane md-option' ) . getBoundingClientRect ( ) . right ;
@@ -1468,6 +1493,21 @@ describe('MdSelect', () => {
1468
1493
expect ( Math . floor ( selectedOptionLeft ) ) . toEqual ( Math . floor ( triggerLeft - 16 ) ) ;
1469
1494
} ) ) ;
1470
1495
1496
+ = === ===
1497
+ fixture . whenStable ( ) . then ( ( ) => {
1498
+ const triggerRight = trigger . getBoundingClientRect ( ) . right ;
1499
+ const firstOptionRight =
1500
+ document . querySelector ( '.cdk-overlay-pane md-option' ) . getBoundingClientRect ( ) . right ;
1501
+
1502
+ // Each option is 32px wider than the trigger, so it must be adjusted 16px
1503
+ // to ensure the text overlaps correctly.
1504
+ expect ( firstOptionRight . toFixed ( 2 ) )
1505
+ . toEqual ( ( triggerRight + 16 ) . toFixed ( 2 ) ,
1506
+ `Expected trigger to align with the selected option on the x-axis in RTL.` ) ;
1507
+ } ) ;
1508
+ } ) ) ;
1509
+
1510
+ >>> > >>> chore : try to fix edge tests
1471
1511
} ) ;
1472
1512
1473
1513
describe ( 'with header ', ( ) => {
0 commit comments