mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
test(router): Ensure change detection runs after navigation (#47629)
Components are not fully rendered until change detection runs. PR Close #47629
This commit is contained in:
parent
da58801f95
commit
2f0761000f
2 changed files with 3 additions and 1 deletions
|
|
@ -33,7 +33,7 @@
|
|||
"cli-hello-world-lazy": {
|
||||
"uncompressed": {
|
||||
"runtime": 2835,
|
||||
"main": 225808,
|
||||
"main": 226404,
|
||||
"polyfills": 33842,
|
||||
"src_app_lazy_lazy_routes_ts": 487
|
||||
}
|
||||
|
|
|
|||
|
|
@ -350,6 +350,7 @@ describe('standalone in Router API', () => {
|
|||
|
||||
const root = TestBed.createComponent(RootCmp);
|
||||
await TestBed.inject(Router).navigateByUrl('/home');
|
||||
root.detectChanges();
|
||||
|
||||
expect(root.nativeElement.innerHTML).toContain('default exported');
|
||||
});
|
||||
|
|
@ -364,6 +365,7 @@ describe('standalone in Router API', () => {
|
|||
|
||||
const root = TestBed.createComponent(RootCmp);
|
||||
await TestBed.inject(Router).navigateByUrl('/home');
|
||||
root.detectChanges();
|
||||
|
||||
expect(root.nativeElement.innerHTML).toContain('default exported');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue