File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -101,17 +101,19 @@ describe('Fragments', () => {
101101 } ) ;
102102
103103 it ( 'Doesnt infinitely load circular references' , async ( ) => {
104+ document . body . innerHTML = await readFile ( { path : './mocks/body.html' } ) ;
104105 const a = document . querySelector ( 'a.frag-a' ) ;
105106 await getFragment ( a ) ;
106107 expect ( document . querySelector ( 'h4' ) ) . to . exist ;
107- expect ( window . lana . log . args [ 2 ] [ 0 ] ) . to . equal ( 'ERROR: Fragment Circular Reference loading http://localhost:2000/test/blocks/fragment/mocks/fragments/frag-a' ) ;
108+ expect ( window . lana . log . lastCall . args [ 0 ] ) . to . equal ( 'Fragment Circular Reference loading http://localhost:2000/test/blocks/fragment/mocks/fragments/frag-a' ) ;
108109 } ) ;
109110
110111 it ( 'Doesnt infinitely load circular reference to itself' , async ( ) => {
112+ document . body . innerHTML = await readFile ( { path : './mocks/body.html' } ) ;
111113 const a = document . querySelector ( 'a.self-ref' ) ;
112114 await getFragment ( a ) ;
113115 expect ( document . querySelector ( 'h5' ) ) . to . exist ;
114- expect ( window . lana . log . args [ 3 ] [ 0 ] ) . to . equal ( 'ERROR: Fragment Circular Reference loading http://localhost:2000/test/blocks/fragment/mocks/fragments/self-ref' ) ;
116+ expect ( window . lana . log . lastCall . args [ 0 ] ) . to . equal ( 'Fragment Circular Reference loading http://localhost:2000/test/blocks/fragment/mocks/fragments/self-ref' ) ;
115117 } ) ;
116118
117119 it ( 'Inlines fragments inside a block' , async ( ) => {
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ describe('LANA', () => {
5858 expect ( xhrRequests . length ) . to . equal ( 1 ) ;
5959 expect ( xhrRequests [ 0 ] . method ) . to . equal ( 'GET' ) ;
6060 expect ( xhrRequests [ 0 ] . url ) . to . equal (
61- 'https://www.stage.adobe.com/lana/ll?m=Promise%20Rejection&c=testClientId&s=100&t=i' ,
61+ 'https://www.stage.adobe.com/lana/ll?m=Promise%20Rejection&c=testClientId&s=100&t=i&r=error ' ,
6262 ) ;
6363 done ( ) ;
6464 } ;
@@ -73,7 +73,7 @@ describe('LANA', () => {
7373 expect ( xhrRequests . length ) . to . equal ( 1 ) ;
7474 expect ( xhrRequests [ 0 ] . method ) . to . equal ( 'GET' ) ;
7575 expect ( xhrRequests [ 0 ] . url ) . to . equal (
76- 'https://www.stage.adobe.com/lana/ll?m=&c=testClientId&s=100&t=i' ,
76+ 'https://www.stage.adobe.com/lana/ll?m=&c=testClientId&s=100&t=i&r=error ' ,
7777 ) ;
7878 done ( ) ;
7979 } ;
You can’t perform that action at this time.
0 commit comments