mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
tests: Fix frontend series and vod tests.
This commit is contained in:
parent
72d1520400
commit
36968631a6
3 changed files with 10 additions and 2 deletions
|
|
@ -7,6 +7,12 @@ import useSettingsStore from '../../store/settings';
|
|||
import { copyToClipboard } from '../../utils';
|
||||
|
||||
// Mock stores
|
||||
vi.mock('../../store/auth', () => ({
|
||||
default: {
|
||||
getState: () => ({ accessToken: null }),
|
||||
},
|
||||
}));
|
||||
|
||||
vi.mock('../../store/useVODStore', () => ({
|
||||
default: vi.fn(),
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -140,7 +140,8 @@ export const getEpisodeStreamUrl = (episode, selectedProvider, env_mode) => {
|
|||
}
|
||||
const token = useAuthStore.getState().accessToken;
|
||||
if (token) params.set('token', token);
|
||||
if (params.toString()) streamUrl += `?${params.toString()}`;
|
||||
if (params.toString())
|
||||
streamUrl += `?${params.toString().replace(/\+/g, '%20')}`;
|
||||
|
||||
if (env_mode === 'dev') {
|
||||
streamUrl = `${window.location.protocol}//${window.location.hostname}:5656${streamUrl}`;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@ export const getMovieStreamUrl = (vod, selectedProvider, env_mode) => {
|
|||
}
|
||||
const token = useAuthStore.getState().accessToken;
|
||||
if (token) params.set('token', token);
|
||||
if (params.toString()) streamUrl += `?${params.toString()}`;
|
||||
if (params.toString())
|
||||
streamUrl += `?${params.toString().replace(/\+/g, '%20')}`;
|
||||
|
||||
if (env_mode === 'dev') {
|
||||
streamUrl = `${window.location.protocol}//${window.location.hostname}:5656${streamUrl}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue