mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-10-29 03:36:15 +08:00
Merge remote-tracking branch 'origin/3.3-dev' into feat/mobile-option-c
This commit is contained in:
@@ -69,8 +69,10 @@ test('changing parser language re-queries the same TMDB title in that locale', a
|
||||
);
|
||||
expect(movie).toMatchObject({
|
||||
official_title: 'ローカライズ映画',
|
||||
episode_type: 'movie',
|
||||
});
|
||||
title_raw: 'Localized Movie',
|
||||
year: 2026,
|
||||
group_name: 'E2E',
|
||||
} satisfies Partial<typeof movie>);
|
||||
|
||||
await activateTmdbScenario(environment, 'localized-retry-jp');
|
||||
const retried = await analyseTmdbFixture(
|
||||
|
||||
@@ -22,6 +22,13 @@ export interface BangumiRecord {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface MovieRecord {
|
||||
official_title: string;
|
||||
title_raw: string | null;
|
||||
year: number | null;
|
||||
group_name: string | null;
|
||||
}
|
||||
|
||||
interface SeedRuleOptions {
|
||||
title: string;
|
||||
uniqueName: string;
|
||||
@@ -99,11 +106,21 @@ export async function mockRequests(
|
||||
return payload.requests;
|
||||
}
|
||||
|
||||
export function analyseTmdbFixture(
|
||||
request: APIRequestContext,
|
||||
environment: E2EEnvironment,
|
||||
fixture: 'tmdb-movie.xml'
|
||||
): Promise<MovieRecord>;
|
||||
export function analyseTmdbFixture(
|
||||
request: APIRequestContext,
|
||||
environment: E2EEnvironment,
|
||||
fixture?: 'tmdb-tv.xml' | 'tmdb-retry.xml'
|
||||
): Promise<BangumiRecord>;
|
||||
export async function analyseTmdbFixture(
|
||||
request: APIRequestContext,
|
||||
environment: E2EEnvironment,
|
||||
fixture = 'tmdb-tv.xml'
|
||||
): Promise<BangumiRecord> {
|
||||
): Promise<BangumiRecord | MovieRecord> {
|
||||
const response = await requireStatus(
|
||||
await request.post('/api/v1/rss/analysis', {
|
||||
data: {
|
||||
@@ -116,7 +133,7 @@ export async function analyseTmdbFixture(
|
||||
}),
|
||||
200
|
||||
);
|
||||
return response.json();
|
||||
return (await response.json()) as BangumiRecord | MovieRecord;
|
||||
}
|
||||
|
||||
async function analyseParserFixture(
|
||||
|
||||
Reference in New Issue
Block a user