test(60): prove the failed-flag reset effect actually runs on channel switch
PR Gates / CI image pin matches docker/ci (pull_request) Successful in 9s
PR Gates / Docs update reminder (pull_request) Successful in 9s
PR Gates / decisions lifecycle (pull_request) Successful in 14s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 6m12s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 7s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 12m57s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 7m39s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 5m30s
PR Gates / CI image pin matches docker/ci (pull_request) Successful in 9s
PR Gates / Docs update reminder (pull_request) Successful in 9s
PR Gates / decisions lifecycle (pull_request) Successful in 14s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 6m12s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 7s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 12m57s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 7m39s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 5m30s
The reset moved from render-phase into an effect; the existing switch test asserted only that the error banner cleared, which stays green even if the effect is deleted. Now the new channel must also reach 'playing'. Negative control: disabling the reset fails exactly this test, and only it. Refs #60
This commit is contained in:
@@ -287,6 +287,17 @@ describe('ChannelPreviewPanel', () => {
|
||||
|
||||
expect(screen.queryByText(/networkError: manifestLoadError/)).not.toBeInTheDocument();
|
||||
expect(hlsMock.loadSource).toHaveBeenLastCalledWith('/iptv/channel/34.1.m3u8');
|
||||
|
||||
// The failed-flag reset runs in an effect, not during render, so prove it actually ran: the
|
||||
// new channel must still be able to reach `playing`. Without this assertion, deleting that
|
||||
// reset leaves the suite green while the new channel sits at `starting` forever, because
|
||||
// onPlaying would keep returning early on the PREVIOUS channel's stale failed flag.
|
||||
const video = document.body.querySelector('video');
|
||||
act(() => {
|
||||
video?.dispatchEvent(new Event('playing'));
|
||||
});
|
||||
|
||||
expect(screen.getByText('playing')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('does not carry the retry play token over to the next channel', () => {
|
||||
|
||||
Reference in New Issue
Block a user