diff --git a/browser_tests/fixtures/ComfyPage.ts b/browser_tests/fixtures/ComfyPage.ts index d46b31a98a..1c145a3080 100644 --- a/browser_tests/fixtures/ComfyPage.ts +++ b/browser_tests/fixtures/ComfyPage.ts @@ -285,6 +285,33 @@ export class ComfyPage { } = {}) { await this.goto() + // Mock remote config endpoint for cloud builds + // Cloud builds (rh-test) call /api/features on startup, which blocks initialization + // if the endpoint doesn't exist or times out. Try real backend first, fallback to empty config. + await this.page.route('**/api/features', async (route) => { + try { + // Try to get response from real backend + const response = await route.fetch() + if (response.ok()) { + await route.fulfill({ response }) + } else { + // Backend doesn't have endpoint, return empty config + await route.fulfill({ + status: 200, + contentType: 'application/json', + body: JSON.stringify({}) + }) + } + } catch { + // Network error, return empty config + await route.fulfill({ + status: 200, + contentType: 'application/json', + body: JSON.stringify({}) + }) + } + }) + // Mock release endpoint to prevent changelog popups if (mockReleases) { await this.page.route('**/releases**', async (route) => { diff --git a/src/router.ts b/src/router.ts index 0b94e4a175..dac8395d9a 100644 --- a/src/router.ts +++ b/src/router.ts @@ -5,6 +5,7 @@ import { } from 'vue-router' import type { RouteLocationNormalized } from 'vue-router' +import { isCloud } from '@/platform/distribution/types' import { useDialogService } from '@/services/dialogService' import { useFirebaseAuthStore } from '@/stores/firebaseAuthStore' import { useUserStore } from '@/stores/userStore' @@ -104,6 +105,9 @@ const router = createRouter({ // Global authentication guard router.beforeEach(async (to, _from, next) => { + // Skip cloud-specific auth guard for non-cloud builds (e.g., Playwright tests) + if (!isCloud) return next() + const authStore = useFirebaseAuthStore() // Wait for Firebase auth to initialize with timeout