test(ivy): failing test for FW-1064 (#29130)

PR Close #29130
This commit is contained in:
Pawel Kozlowski 2019-02-15 15:13:56 +01:00 committed by Andrew Kushnir
parent dc6192c8e5
commit 268c3fe816
1 changed files with 33 additions and 0 deletions

View File

@ -329,6 +329,39 @@ class TestCmpt {
expect(getDOM().hasClass(childTestEls[3].nativeElement, 'childnested')).toBe(true);
});
it('should query projected child elements by directive', () => {
@Directive({selector: 'example-directive-a'})
class ExampleDirectiveA {
}
@Component({
selector: 'wrapper-component',
template: `
<ng-content select="example-directive-a"></ng-content>
`
})
class WrapperComponent {
}
TestBed.configureTestingModule({
declarations: [
WrapperComponent,
ExampleDirectiveA,
]
});
TestBed.overrideTemplate(TestApp, `<wrapper-component>
<div></div>
<example-directive-a></example-directive-a>
</wrapper-component>`);
const fixture = TestBed.createComponent(TestApp);
fixture.detectChanges();
const debugElement = fixture.debugElement.query(By.directive(ExampleDirectiveA));
expect(debugElement).toBeTruthy();
});
it('should list providerTokens', () => {
fixture = TestBed.createComponent(ParentComp);
fixture.detectChanges();