@@ -19,7 +19,7 @@ import { render, fireEvent, screen } from '../src/public_api';
1919 <button>button</button>
2020 ` ,
2121} )
22- class FixtureComponent { }
22+ class FixtureComponent { }
2323
2424test ( 'creates queries and events' , async ( ) => {
2525 const view = await render ( FixtureComponent ) ;
@@ -50,46 +50,46 @@ describe('standalone', () => {
5050
5151describe ( 'standalone with child' , ( ) => {
5252 @Component ( {
53- selector : 'child-fixture' ,
53+ selector : 'atl- child-fixture' ,
5454 template : `<span>A child fixture</span>` ,
5555 standalone : true ,
5656 } )
57- class ChildFixture { }
57+ class ChildFixtureComponent { }
5858
5959 @Component ( {
60- selector : 'child-fixture' ,
60+ selector : 'atl- child-fixture' ,
6161 template : `<span>A mock child fixture</span>` ,
6262 standalone : true ,
6363 } )
64- class MockChildFixture { }
64+ class MockChildFixtureComponent { }
6565
6666 @Component ( {
67- selector : 'parent-fixture' ,
67+ selector : 'atl- parent-fixture' ,
6868 template : `<h1>Parent fixture</h1>
69- <div><child-fixture></child-fixture></div> ` ,
69+ <div><atl- child-fixture></atl- child-fixture></div> ` ,
7070 standalone : true ,
71- imports : [ ChildFixture ] ,
71+ imports : [ ChildFixtureComponent ] ,
7272 } )
73- class ParentFixture { }
73+ class ParentFixtureComponent { }
7474
7575 it ( 'renders the standalone component with child' , async ( ) => {
76- await render ( ParentFixture ) ;
77- expect ( screen . getByText ( 'Parent fixture' ) ) ;
78- expect ( screen . getByText ( 'A child fixture' ) ) ;
76+ await render ( ParentFixtureComponent ) ;
77+ expect ( screen . getByText ( 'Parent fixture' ) ) . toBeInTheDocument ( ) ;
78+ expect ( screen . getByText ( 'A child fixture' ) ) . toBeInTheDocument ( ) ;
7979 } ) ;
8080
81- it ( 'renders the standalone component with child' , async ( ) => {
82- await render ( ParentFixture , { ɵcomponentImports : [ MockChildFixture ] } ) ;
83- expect ( screen . getByText ( 'Parent fixture' ) ) ;
84- expect ( screen . getByText ( 'A mock child fixture' ) ) ;
81+ it ( 'renders the standalone component with a mocked child' , async ( ) => {
82+ await render ( ParentFixtureComponent , { componentImports : [ MockChildFixtureComponent ] } ) ;
83+ expect ( screen . getByText ( 'Parent fixture' ) ) . toBeInTheDocument ( ) ;
84+ expect ( screen . getByText ( 'A mock child fixture' ) ) . toBeInTheDocument ( ) ;
8585 } ) ;
8686
8787 it ( 'rejects render of template with componentImports set' , ( ) => {
88- const result = render ( `<div><parent-fixture></parent-fixture></div>` , {
89- imports : [ ParentFixture ] ,
90- ɵcomponentImports : [ MockChildFixture ] ,
88+ const view = render ( `<div><atl- parent-fixture></atl- parent-fixture></div>` , {
89+ imports : [ ParentFixtureComponent ] ,
90+ componentImports : [ MockChildFixtureComponent ] ,
9191 } ) ;
92- return expect ( result ) . rejects . toMatchObject ( { message : / E r r o r w h i l e r e n d e r i n g / } ) ;
92+ return expect ( view ) . rejects . toMatchObject ( { message : / E r r o r w h i l e r e n d e r i n g / } ) ;
9393 } ) ;
9494} ) ;
9595
@@ -117,7 +117,7 @@ describe('animationModule', () => {
117117 @NgModule ( {
118118 declarations : [ FixtureComponent ] ,
119119 } )
120- class FixtureModule { }
120+ class FixtureModule { }
121121 describe ( 'excludeComponentDeclaration' , ( ) => {
122122 it ( 'does not throw if component is declared in an imported module' , async ( ) => {
123123 await render ( FixtureComponent , {
0 commit comments