mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-18 21:54:09 +00:00
0e6d6cd416
* refactor: allow secondary rundowns * ui: move dropdown * feat: follow loaded * ui: background edit warning ui: fix disable radio button * feat(ui): add loaded sufix in the rundown list * feat(ui): add direct link to background edit from rundown manager * fix: better fallback * fix: default to is isCurrentRundown for nav bar colour * chore: rename navigate to cuesheet --------- Co-authored-by: alex-arc <ac@omnivox.dk>
22 lines
813 B
TypeScript
22 lines
813 B
TypeScript
import {
|
|
FOLLOW_LOADED_RUNDOWN_ID,
|
|
getCuesheetRundownStorageKey,
|
|
resolveSelectedRundownId,
|
|
} from '../useCuesheetRundownSelection';
|
|
|
|
describe('useCuesheetRundownSelection helpers', () => {
|
|
it('builds a project-scoped storage key', () => {
|
|
expect(getCuesheetRundownStorageKey('http://localhost:4001', 'My Project')).toBe(
|
|
'cuesheet-selected-rundown:http://localhost:4001:My Project',
|
|
);
|
|
});
|
|
|
|
it('falls back to the follow loaded rundown when the stored selection is missing', () => {
|
|
expect(resolveSelectedRundownId('missing', new Set(['loaded', 'other']))).toBe(FOLLOW_LOADED_RUNDOWN_ID);
|
|
});
|
|
|
|
it('keeps the stored selection when it still exists in the current project', () => {
|
|
expect(resolveSelectedRundownId('other', new Set(['loaded', 'other']))).toBe('other');
|
|
});
|
|
});
|