@@ -88,24 +88,24 @@ describe('scrollable viewport', () => {
8888 it ( 'should update the position on scrolling' , ( ) => {
8989 enter ( input ) ;
9090
91- expect ( overlay . getBoundingClientRect ( ) . bottom ) . to . be . equal ( inputFieldBlock . getBoundingClientRect ( ) . bottom ) ;
92- expect ( overlay . getBoundingClientRect ( ) . left ) . to . be . equal ( inputFieldBlock . getBoundingClientRect ( ) . left ) ;
91+ expect ( overlay . getBoundingClientRect ( ) . bottom ) . to . be . closeTo ( inputFieldBlock . getBoundingClientRect ( ) . bottom , 1 ) ;
92+ expect ( overlay . getBoundingClientRect ( ) . left ) . to . be . closeTo ( inputFieldBlock . getBoundingClientRect ( ) . left , 1 ) ;
9393
9494 scrollContainer ( scrollableContainer , 40 , 40 ) ;
9595
96- expect ( overlay . getBoundingClientRect ( ) . bottom ) . to . be . equal ( inputFieldBlock . getBoundingClientRect ( ) . bottom ) ;
97- expect ( overlay . getBoundingClientRect ( ) . left ) . to . be . equal ( inputFieldBlock . getBoundingClientRect ( ) . left ) ;
96+ expect ( overlay . getBoundingClientRect ( ) . bottom ) . to . be . closeTo ( inputFieldBlock . getBoundingClientRect ( ) . bottom , 1 ) ;
97+ expect ( overlay . getBoundingClientRect ( ) . left ) . to . be . closeTo ( inputFieldBlock . getBoundingClientRect ( ) . left , 1 ) ;
9898 } ) ;
9999
100100 it ( 'should update the position on iron-resize event' , ( ) => {
101101 enter ( input ) ;
102- expect ( overlay . getBoundingClientRect ( ) . bottom ) . to . be . equal ( inputFieldBlock . getBoundingClientRect ( ) . bottom ) ;
103- expect ( overlay . getBoundingClientRect ( ) . left ) . to . be . equal ( inputFieldBlock . getBoundingClientRect ( ) . left ) ;
102+ expect ( overlay . getBoundingClientRect ( ) . bottom ) . to . be . closeTo ( inputFieldBlock . getBoundingClientRect ( ) . bottom , 1 ) ;
103+ expect ( overlay . getBoundingClientRect ( ) . left ) . to . be . closeTo ( inputFieldBlock . getBoundingClientRect ( ) . left , 1 ) ;
104104
105105 container . style . paddingTop = '200px' ;
106106 select . dispatchEvent ( new CustomEvent ( 'iron-resize' , { bubbles : true } ) ) ;
107107
108- expect ( overlay . getBoundingClientRect ( ) . top ) . to . be . equal ( inputFieldBlock . getBoundingClientRect ( ) . top ) ;
109- expect ( overlay . getBoundingClientRect ( ) . left ) . to . be . equal ( inputFieldBlock . getBoundingClientRect ( ) . left ) ;
108+ expect ( overlay . getBoundingClientRect ( ) . top ) . to . be . closeTo ( inputFieldBlock . getBoundingClientRect ( ) . top , 1 ) ;
109+ expect ( overlay . getBoundingClientRect ( ) . left ) . to . be . closeTo ( inputFieldBlock . getBoundingClientRect ( ) . left , 1 ) ;
110110 } ) ;
111111} ) ;
0 commit comments