mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-09 01:16:15 -08:00
The two component specs in this lib had been carrying 7 long-standing failures rooted in three stale-mock issues, all unrelated to public behaviour but enough to make the suite red on every run. Header spec (5 failures, NG0303 on app-playlist-switcher): - MockPlaylistSwitcherComponent was missing canRefreshActivePlaylist / isRefreshingActivePlaylist inputs and refreshPlaylistRequested output. The real PlaylistSwitcherComponent grew them when refresh was added to the header; the mock never caught up. Re-aligned. Workspace-shell component spec (2 failures): - NG0301 on #dropZone="playlistDropZone" because overrideComponent's set.imports list dropped PlaylistDropZoneDirective and the drop overlay component. Added MockPlaylistDropZoneDirective and MockPlaylistDropOverlayComponent. - After the recent option-D refactor that lifted the import overlay into its own child component, the spec also needed MockWorkspaceShellImportOverlayComponent so the parent template could resolve <app-workspace-shell-import-overlay />. - MockWorkspaceShellHeaderComponent gained hasNoPlaylists input and MockWorkspaceShellContextSidebarComponent gained hasPlaylists input to match the real components. - The "renders type-aware xtream import progress copy" test asserted on inline overlay markup that no longer lives in the parent template. Replaced with a structural test that the overlay child renders/unmounts based on facade.showXtreamImportOverlay(). New focused spec for WorkspaceShellImportOverlayComponent (6 tests) covers the moved progress-copy assertion at the right level by mocking the WorkspaceShellXtreamImportService directly: title, progress copy, determinate vs indeterminate progress bar, badge tone, and cancel forwarding. Final state: full feature lib suite is 66/66 (was 53/60 with 7 chronic failures). pnpm nx test web, pnpm nx lint workspace-shell-feature, pnpm nx build web --configuration=production, and the basic + settings web-e2e suites all pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: c2cea9c530e6