@@ -57,7 +57,7 @@ describe('FlexibleConnectedPositionStrategy', () => {
5757 }
5858
5959 it ( 'should throw when attempting to attach to multiple different overlays' , ( ) => {
60- const origin = new ElementRef ( document . createElement ( 'div' ) ) ;
60+ const origin = document . createElement ( 'div' ) ;
6161 const positionStrategy = overlay . position ( )
6262 . flexibleConnectedTo ( origin )
6363 . withPositions ( [ {
@@ -68,16 +68,16 @@ describe('FlexibleConnectedPositionStrategy', () => {
6868 } ] ) ;
6969
7070 // Needs to be in the DOM for IE not to throw an "Unspecified error".
71- document . body . appendChild ( origin . nativeElement ) ;
71+ document . body . appendChild ( origin ) ;
7272 attachOverlay ( { positionStrategy} ) ;
7373
7474 expect ( ( ) => attachOverlay ( { positionStrategy} ) ) . toThrow ( ) ;
7575
76- document . body . removeChild ( origin . nativeElement ) ;
76+ document . body . removeChild ( origin ) ;
7777 } ) ;
7878
7979 it ( 'should not throw when trying to apply after being disposed' , ( ) => {
80- const origin = new ElementRef ( document . createElement ( 'div' ) ) ;
80+ const origin = document . createElement ( 'div' ) ;
8181 const positionStrategy = overlay . position ( )
8282 . flexibleConnectedTo ( origin )
8383 . withPositions ( [ {
@@ -88,17 +88,17 @@ describe('FlexibleConnectedPositionStrategy', () => {
8888 } ] ) ;
8989
9090 // Needs to be in the DOM for IE not to throw an "Unspecified error".
91- document . body . appendChild ( origin . nativeElement ) ;
91+ document . body . appendChild ( origin ) ;
9292 attachOverlay ( { positionStrategy} ) ;
9393 overlayRef . dispose ( ) ;
9494
9595 expect ( ( ) => positionStrategy . apply ( ) ) . not . toThrow ( ) ;
9696
97- document . body . removeChild ( origin . nativeElement ) ;
97+ document . body . removeChild ( origin ) ;
9898 } ) ;
9999
100100 it ( 'should not throw when trying to re-apply the last position after being disposed' , ( ) => {
101- const origin = new ElementRef ( document . createElement ( 'div' ) ) ;
101+ const origin = document . createElement ( 'div' ) ;
102102 const positionStrategy = overlay . position ( )
103103 . flexibleConnectedTo ( origin )
104104 . withPositions ( [ {
@@ -109,13 +109,13 @@ describe('FlexibleConnectedPositionStrategy', () => {
109109 } ] ) ;
110110
111111 // Needs to be in the DOM for IE not to throw an "Unspecified error".
112- document . body . appendChild ( origin . nativeElement ) ;
112+ document . body . appendChild ( origin ) ;
113113 attachOverlay ( { positionStrategy} ) ;
114114 overlayRef . dispose ( ) ;
115115
116116 expect ( ( ) => positionStrategy . reapplyLastPosition ( ) ) . not . toThrow ( ) ;
117117
118- document . body . removeChild ( origin . nativeElement ) ;
118+ document . body . removeChild ( origin ) ;
119119 } ) ;
120120
121121 describe ( 'without flexible dimensions and pushing' , ( ) => {
@@ -132,7 +132,7 @@ describe('FlexibleConnectedPositionStrategy', () => {
132132 originElement = createPositionedBlockElement ( ) ;
133133 document . body . appendChild ( originElement ) ;
134134 positionStrategy = overlay . position ( )
135- . flexibleConnectedTo ( new ElementRef ( originElement ) )
135+ . flexibleConnectedTo ( originElement )
136136 . withFlexibleDimensions ( false )
137137 . withPush ( false ) ;
138138 } ) ;
@@ -984,7 +984,7 @@ describe('FlexibleConnectedPositionStrategy', () => {
984984 originElement = createPositionedBlockElement ( ) ;
985985 document . body . appendChild ( originElement ) ;
986986 positionStrategy = overlay . position ( )
987- . flexibleConnectedTo ( new ElementRef ( originElement ) )
987+ . flexibleConnectedTo ( originElement )
988988 . withFlexibleDimensions ( false )
989989 . withPush ( ) ;
990990 } ) ;
@@ -1113,7 +1113,7 @@ describe('FlexibleConnectedPositionStrategy', () => {
11131113 beforeEach ( ( ) => {
11141114 originElement = createPositionedBlockElement ( ) ;
11151115 document . body . appendChild ( originElement ) ;
1116- positionStrategy = overlay . position ( ) . flexibleConnectedTo ( new ElementRef ( originElement ) ) ;
1116+ positionStrategy = overlay . position ( ) . flexibleConnectedTo ( originElement ) ;
11171117 } ) ;
11181118
11191119 afterEach ( ( ) => {
@@ -1532,7 +1532,7 @@ describe('FlexibleConnectedPositionStrategy', () => {
15321532
15331533 // Create a strategy with knowledge of the scrollable container
15341534 const strategy = overlay . position ( )
1535- . flexibleConnectedTo ( new ElementRef ( originElement ) )
1535+ . flexibleConnectedTo ( originElement )
15361536 . withPush ( false )
15371537 . withPositions ( [ {
15381538 originX : 'start' ,
@@ -1611,7 +1611,7 @@ describe('FlexibleConnectedPositionStrategy', () => {
16111611 beforeEach ( ( ) => {
16121612 originElement = createPositionedBlockElement ( ) ;
16131613 document . body . appendChild ( originElement ) ;
1614- positionStrategy = overlay . position ( ) . flexibleConnectedTo ( new ElementRef ( originElement ) ) ;
1614+ positionStrategy = overlay . position ( ) . flexibleConnectedTo ( originElement ) ;
16151615 } ) ;
16161616
16171617 afterEach ( ( ) => {
@@ -1721,7 +1721,7 @@ describe('FlexibleConnectedPositionStrategy', () => {
17211721 beforeEach ( ( ) => {
17221722 originElement = createPositionedBlockElement ( ) ;
17231723 document . body . appendChild ( originElement ) ;
1724- positionStrategy = overlay . position ( ) . flexibleConnectedTo ( new ElementRef ( originElement ) ) ;
1724+ positionStrategy = overlay . position ( ) . flexibleConnectedTo ( originElement ) ;
17251725 } ) ;
17261726
17271727 afterEach ( ( ) => {
0 commit comments