diff --git a/browser_tests/fixtures/helpers/TemplateHelper.ts b/browser_tests/fixtures/helpers/TemplateHelper.ts index 98a6d431f42..e008e51eac4 100644 --- a/browser_tests/fixtures/helpers/TemplateHelper.ts +++ b/browser_tests/fixtures/helpers/TemplateHelper.ts @@ -69,6 +69,24 @@ export class TemplateHelper { } async mockIndex(): Promise { + const customTemplatesHandler = async (route: Route) => { + const customTemplates: Record = {} + await route.fulfill({ + status: 200, + body: JSON.stringify(customTemplates), + headers: { + 'Content-Type': 'application/json', + 'Cache-Control': 'no-store' + } + }) + } + const customTemplatesPattern = '**/api/workflow_templates' + this.routeHandlers.push({ + pattern: customTemplatesPattern, + handler: customTemplatesHandler + }) + await this.page.route(customTemplatesPattern, customTemplatesHandler) + const indexHandler = async (route: Route) => { const payload = this.index ?? mockTemplateIndex(this.templates) await route.fulfill({ diff --git a/browser_tests/tests/templateFilteringCount.spec.ts b/browser_tests/tests/templateFilteringCount.spec.ts index 59f7d898b6b..56474ba7357 100644 --- a/browser_tests/tests/templateFilteringCount.spec.ts +++ b/browser_tests/tests/templateFilteringCount.spec.ts @@ -1,13 +1,13 @@ import { expect, mergeTests } from '@playwright/test' import { TemplateIncludeOnDistributionEnum } from '@/platform/workflow/templates/types/template' -import { comfyPageFixture } from '@e2e/fixtures/ComfyPage' +import { createCloudAssetsFixture } from '@e2e/fixtures/assetApiFixture' import { makeTemplate } from '@e2e/fixtures/data/templateFixtures' import { withTemplates } from '@e2e/fixtures/helpers/TemplateHelper' import { TestIds } from '@e2e/fixtures/selectors' import { templateApiFixture } from '@e2e/fixtures/templateApiFixture' -const test = mergeTests(comfyPageFixture, templateApiFixture) +const test = mergeTests(createCloudAssetsFixture([]), templateApiFixture) const Cloud = TemplateIncludeOnDistributionEnum.Cloud const Desktop = TemplateIncludeOnDistributionEnum.Desktop