mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
test(portal): let the favorites handler's markForCheck render the heart
Review follow-up (Greptile): the test forced detectChanges() after the favorites arrived, so it passed without the handler's markForCheck(). It now lets the fixture render on its own; removing the call fails it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
23b9f04f89
commit
fdcb47d140
1 file changed
+5
-1
+5
-1
@@ -931,6 +931,9 @@ describe('PortalChannelsListComponent', () => {
|
||||
.componentInstance as ChannelListItemComponent;
|
||||
expect(row().isFavorite()).toBe(false);
|
||||
|
||||
// From here the fixture renders on its own: a forced detectChanges()
|
||||
// would hide a favorites handler that does not mark the view.
|
||||
fixture.autoDetectChanges();
|
||||
favorites$.next([
|
||||
{
|
||||
content_id: 1,
|
||||
@@ -941,7 +944,8 @@ describe('PortalChannelsListComponent', () => {
|
||||
xtream_id: 50,
|
||||
},
|
||||
] satisfies FavoriteItem[]);
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
await new Promise((resolve) => setTimeout(resolve));
|
||||
|
||||
expect(row().isFavorite()).toBe(true);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user