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:
4grayandClaude Opus 5.5 committed 2026-10-06 22:21:43 +02:00
1 parent 23b9f04f89
commit fdcb47d140
1 file changed
+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);
});