test: fix test not passing due to new API version

This commit is contained in:
MrTimscampi 2021-08-27 13:02:37 +02:00 committed by Julien Machiels
parent 46f7eb921f
commit 976e8345eb
3 changed files with 10 additions and 7 deletions

View File

@ -7,3 +7,4 @@ dist
sw.*
src/.nuxt
src/dist
src/dist/_nuxt

3
.gitignore vendored
View File

@ -37,6 +37,7 @@ build/Release
# Dependency directories
node_modules/
jspm_packages/
src/node_modules/
# TypeScript v1 declaration files
typings/
@ -67,9 +68,11 @@ typings/
# nuxt.js build output
.nuxt
src/.nuxt
# Nuxt generate
dist
src/dist
# vuepress build output
.vuepress/dist

View File

@ -2,7 +2,6 @@ import Vue, { VueConstructor } from 'vue';
import { createLocalVue } from '@vue/test-utils';
import Vuex, { Store } from 'vuex';
import cloneDeep from 'lodash/cloneDeep';
import { BaseItemDto, BaseItemDtoQueryResult } from '@jellyfin/client-axios';
import {
state,
mutations,
@ -17,27 +16,27 @@ let store: Store<TvShowsState>;
const TEST_TV_SERIES = {
Id: 'series-id-1'
} as BaseItemDto;
};
const TEST_TV_SEASON_1 = {
Id: 'season-id-1',
ParentId: 'series-id-1'
} as BaseItemDto;
};
const TEST_TV_SEASON_2 = {
Id: 'season-id-2',
ParentId: 'series-id-1'
} as BaseItemDto;
};
const TEST_TV_EPISODE_1 = {
Id: 'episode-id-1',
ParentId: 'season-id-2'
} as BaseItemDto;
};
const TEST_TV_EPISODE_2 = {
Id: 'episode-id-1',
ParentId: 'season-id-2'
} as BaseItemDto;
};
beforeEach(() => {
localVue = createLocalVue();
@ -97,7 +96,7 @@ describe('vuex: tvShows', () => {
store.dispatch('getTvShowsSeasonEpisodesSuccess', {
response: {
Items: [TEST_TV_EPISODE_1, TEST_TV_EPISODE_2]
} as BaseItemDtoQueryResult,
},
itemId: TEST_TV_SERIES.Id,
seasonItemId: TEST_TV_SEASON_1.Id
});