@@ -6,7 +6,6 @@ import 'package:angular/core.dart'
6
6
show Component, Directive, Input, ViewChild, ViewChildren, Visibility;
7
7
import 'package:angular/src/core/linker.dart'
8
8
show ElementRef, TemplateRef, ViewContainerRef;
9
- import 'package:angular/src/debug/debug_node.dart' show getAllDebugNodes;
10
9
import 'package:angular_test/angular_test.dart' ;
11
10
12
11
import 'projection_integration_test.template.dart' as ng_generated;
@@ -105,18 +104,10 @@ void main() {
105
104
test ('should support moving non projected light dom around' , () async {
106
105
var testBed = new NgTestBed <MoveLightDomTest >();
107
106
var fixture = await testBed.create ();
108
-
109
- // Have to search for the directive because it's not in the DOM at all.
110
- ManualViewportDirective sourceDirective;
111
- getAllDebugNodes ().forEach ((debug) {
112
- if (debug.providerTokens.contains (ManualViewportDirective )) {
113
- sourceDirective = debug.inject (ManualViewportDirective );
114
- }
115
- });
116
-
117
107
expect (fixture.text, 'START()END' );
118
108
await fixture.update ((MoveLightDomTest component) {
119
- component.projectDirective.show (sourceDirective.templateRef);
109
+ component.projectDirective
110
+ .show (component.manualViewportDirective.templateRef);
120
111
});
121
112
expect (fixture.text, 'START(A)END' );
122
113
});
@@ -415,10 +406,11 @@ class TextNodeAfterStyleComponent {
415
406
'</empty>'
416
407
'START(<div project></div>)END' ,
417
408
directives: const [Empty , ProjectDirective , ManualViewportDirective ],
418
- // TODO(b/71710685): Change to `Visibility.local` to reduce code size.
419
- visibility: Visibility .all,
420
409
)
421
410
class MoveLightDomTest {
411
+ @ViewChild (ManualViewportDirective )
412
+ ManualViewportDirective manualViewportDirective;
413
+
422
414
@ViewChild (ProjectDirective )
423
415
ProjectDirective projectDirective;
424
416
}
0 commit comments