mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08: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:
committed by
Andrew Kushnir
parent
da58801f95
commit
2f0761000f
@@ -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');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user