Compare commits

...

1 Commits

Author SHA1 Message Date
dante01yoon
85f10245d1 test(e2e): align asset/jobs fixture imports to core OpenAPI naming
Renames cloud-ingest symbol names to their core OpenAPI equivalents in
e2e fixtures so that once the ingest-types source is flipped from
Comfy-Org/cloud to Comfy-Org/ComfyUI core, typecheck:browser passes
without further fixture edits.

- CreateAssetExportData -> ExportAssetsData (POST /api/assets/export)
- CreateAssetExportResponse -> ExportAssetsResponse
- JobsListResponse -> ListJobsResponse

The asset-export fixture response also drops the cloud-only `status`
field; the core ExportAssetsResponse schema is { task_id?, export_name? }.

Depends on the ingest-types source flip; until that lands and the auto
regeneration runs, this branch's typecheck:browser will be red. Opening
as draft to surface the gap to Matt while spec-side decisions on
shape drifts (HubProfile, AssetInfo, HubLabel, GetHubAssetUploadUrl,
zQueueManageResponse) are still pending.
2026-05-22 07:26:40 +09:00
3 changed files with 17 additions and 18 deletions

View File

@@ -1,9 +1,9 @@
import type { Page, Route } from '@playwright/test'
import type {
CreateAssetExportData,
CreateAssetExportResponse,
JobsListResponse,
ListAssetsResponse
ExportAssetsData,
ExportAssetsResponse,
ListAssetsResponse,
ListJobsResponse
} from '@comfyorg/ingest-types'
import type {
@@ -178,8 +178,8 @@ export class AssetsHelper {
null
private generatedJobs: RawJobListItem[] = []
private cloudAssetsResponse: ListAssetsResponse | null = null
private assetExportRequests: CreateAssetExportData['body'][] = []
private assetExportResponse: CreateAssetExportResponse | null = null
private assetExportRequests: ExportAssetsData['body'][] = []
private assetExportResponse: ExportAssetsResponse | null = null
private importedFiles: string[] = []
private readonly jobDetailRouteHandlers = new Map<
string,
@@ -248,7 +248,7 @@ export class AssetsHelper {
}
} satisfies {
jobs: unknown[]
pagination: JobsListResponse['pagination']
pagination: ListJobsResponse['pagination']
}
await route.fulfill({
@@ -288,11 +288,10 @@ export class AssetsHelper {
}
async captureAssetExportRequests(
response: CreateAssetExportResponse = {
task_id: 'asset-export-task',
status: 'created'
response: ExportAssetsResponse = {
task_id: 'asset-export-task'
}
): Promise<CreateAssetExportData['body'][]> {
): Promise<ExportAssetsData['body'][]> {
this.assetExportRequests = []
this.assetExportResponse = response
@@ -302,7 +301,7 @@ export class AssetsHelper {
this.assetExportRouteHandler = async (route: Route) => {
this.assetExportRequests.push(
route.request().postDataJSON() as CreateAssetExportData['body']
route.request().postDataJSON() as ExportAssetsData['body']
)
await route.fulfill({

View File

@@ -2,8 +2,8 @@ import { expect } from '@playwright/test'
import type {
Asset,
JobsListResponse,
ListAssetsResponse
ListAssetsResponse,
ListJobsResponse
} from '@comfyorg/ingest-types'
import { comfyPageFixture } from '@e2e/fixtures/ComfyPage'
import { createMixedMediaJobs } from '@e2e/fixtures/helpers/AssetsHelper'
@@ -51,7 +51,7 @@ function makeJobsResponseBody() {
}
} satisfies {
jobs: unknown[]
pagination: JobsListResponse['pagination']
pagination: ListJobsResponse['pagination']
}
}

View File

@@ -2,8 +2,8 @@ import { expect } from '@playwright/test'
import type {
Asset,
JobsListResponse,
ListAssetsResponse
ListAssetsResponse,
ListJobsResponse
} from '@comfyorg/ingest-types'
import { comfyPageFixture } from '@e2e/fixtures/ComfyPage'
import { createJobsWithExecutionTimes } from '@e2e/fixtures/helpers/AssetsHelper'
@@ -55,7 +55,7 @@ function makeJobsResponseBody() {
}
} satisfies {
jobs: unknown[]
pagination: JobsListResponse['pagination']
pagination: ListJobsResponse['pagination']
}
}