@@ -291,7 +291,7 @@ describe("Renderer E2E", () => {
291
291
it ( "ngIf hides component when false" , ( ) => {
292
292
return testApp . loadComponent ( NgIfLabel ) . then ( ( componentRef ) => {
293
293
const componentRoot = componentRef . instance . elementRef . nativeElement ;
294
- assert . equal ( "(ProxyViewContainer (CommentNode) )" , dumpView ( componentRoot ) ) ;
294
+ assert . equal ( "(ProxyViewContainer)" , dumpView ( componentRoot ) ) ;
295
295
} ) ;
296
296
} ) ;
297
297
@@ -302,7 +302,7 @@ describe("Renderer E2E", () => {
302
302
303
303
component . show = true ;
304
304
testApp . appRef . tick ( ) ;
305
- assert . equal ( "(ProxyViewContainer (CommentNode), ( Label))" , dumpView ( componentRoot ) ) ;
305
+ assert . equal ( "(ProxyViewContainer (Label))" , dumpView ( componentRoot ) ) ;
306
306
} ) ;
307
307
} ) ;
308
308
@@ -314,12 +314,11 @@ describe("Renderer E2E", () => {
314
314
component . show = true ;
315
315
testApp . appRef . tick ( ) ;
316
316
assert . equal (
317
- "(ProxyViewContainer (StackLayout (CommentNode), ( Label), (Button)))" ,
317
+ "(ProxyViewContainer (StackLayout (Label), (Button)))" ,
318
318
dumpView ( componentRoot ) ) ;
319
319
} ) ;
320
320
} ) ;
321
321
322
-
323
322
it ( "ngIf shows elements in correct order when multiple are rendered and there's *ngIf" , ( ) => {
324
323
return testApp . loadComponent ( NgIfMultiple ) . then ( ( componentRef ) => {
325
324
const component = < NgIfMultiple > componentRef . instance ;
@@ -333,8 +332,7 @@ describe("Renderer E2E", () => {
333
332
"(Label[text=1]), " +
334
333
"(Label[text=2]), " +
335
334
"(Label[text=3]), " +
336
- "(CommentNode), " + // ng-reflect comment
337
- "(Label[text=4]), " + // the content to be displayed and its anchor
335
+ "(Label[text=4]), " + // the content to be conditionally displayed
338
336
"(Label[text=5])" +
339
337
")" +
340
338
")" ,
@@ -348,13 +346,15 @@ describe("Renderer E2E", () => {
348
346
const componentRoot = component . elementRef . nativeElement ;
349
347
350
348
testApp . appRef . tick ( ) ;
349
+
351
350
assert . equal (
352
351
"(ProxyViewContainer " +
353
352
"(StackLayout " +
354
- "(CommentNode), " + // ng-reflect comment
355
- "(Label[text=If]), (CommentNode)))" , // the content to be displayed and its anchor
353
+ "(Label[text=If])" +
354
+ ")" +
355
+ ")" ,
356
356
357
- dumpView ( componentRoot , true ) ) ;
357
+ dumpView ( componentRoot , true ) ) ;
358
358
} ) ;
359
359
} ) ;
360
360
@@ -368,10 +368,11 @@ describe("Renderer E2E", () => {
368
368
assert . equal (
369
369
"(ProxyViewContainer " +
370
370
"(StackLayout " +
371
- "(CommentNode), " + // ng-reflect comment
372
- "(Label[text=Else]), (CommentNode)))" , // the content to be displayed and its anchor
371
+ "(Label[text=Else])" +
372
+ ")" +
373
+ ")" ,
373
374
374
- dumpView ( componentRoot , true ) ) ;
375
+ dumpView ( componentRoot , true ) ) ;
375
376
} ) ;
376
377
} ) ;
377
378
@@ -384,11 +385,11 @@ describe("Renderer E2E", () => {
384
385
assert . equal (
385
386
"(ProxyViewContainer " +
386
387
"(StackLayout " +
387
- "(CommentNode), " + // ng-reflect comment
388
- "(Label[text=Then]), (CommentNode), " + // the content to be displayed and its anchor
389
- "(CommentNode)))" , // the anchor for the else template
388
+ "(Label[text=Then]) " +
389
+ ") " +
390
+ ")" ,
390
391
391
- dumpView ( componentRoot , true ) ) ;
392
+ dumpView ( componentRoot , true ) ) ;
392
393
} ) ;
393
394
} ) ;
394
395
@@ -403,19 +404,19 @@ describe("Renderer E2E", () => {
403
404
assert . equal (
404
405
"(ProxyViewContainer " +
405
406
"(StackLayout " +
406
- "(CommentNode), " + // the content to be displayed
407
- "(Label[text=Else]), (CommentNode), " + // the content to be displayed
408
- "(CommentNode)))" , // the content to be displayed
407
+ "(Label[text=Else]) " +
408
+ ") " +
409
+ ")" ,
409
410
410
- dumpView ( componentRoot , true ) ) ;
411
+ dumpView ( componentRoot , true ) ) ;
411
412
} ) ;
412
413
} ) ;
413
414
414
415
it ( "ngFor creates element for each item" , ( ) => {
415
416
return testApp . loadComponent ( NgForLabel ) . then ( ( componentRef ) => {
416
417
const componentRoot = componentRef . instance . elementRef . nativeElement ;
417
418
assert . equal (
418
- "(ProxyViewContainer (CommentNode), ( Label[text=one]), (Label[text=two]), (Label[text=three]))" ,
419
+ "(ProxyViewContainer (Label[text=one]), (Label[text=two]), (Label[text=three]))" ,
419
420
dumpView ( componentRoot , true ) ) ;
420
421
} ) ;
421
422
} ) ;
@@ -429,7 +430,7 @@ describe("Renderer E2E", () => {
429
430
testApp . appRef . tick ( ) ;
430
431
431
432
assert . equal (
432
- "(ProxyViewContainer (CommentNode), ( Label[text=one]), (Label[text=three]))" ,
433
+ "(ProxyViewContainer (Label[text=one]), (Label[text=three]))" ,
433
434
dumpView ( componentRoot , true ) ) ;
434
435
} ) ;
435
436
} ) ;
@@ -443,7 +444,7 @@ describe("Renderer E2E", () => {
443
444
testApp . appRef . tick ( ) ;
444
445
445
446
assert . equal (
446
- "(ProxyViewContainer (CommentNode), " +
447
+ "(ProxyViewContainer " +
447
448
"(Label[text=one]), (Label[text=new]), (Label[text=two]), (Label[text=three]))" ,
448
449
dumpView ( componentRoot , true ) ) ;
449
450
} ) ;
0 commit comments