Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

fix: isolate settings readiness browser audit

NoxsMediaece09ecd748b
diff --git a/web/tests/e2e/settings-navigation.audit.ts b/web/tests/e2e/settings-navigation.audit.ts
index 1cd936597..760411ad9 100644
--- a/web/tests/e2e/settings-navigation.audit.ts
+++ b/web/tests/e2e/settings-navigation.audit.ts
@@ -4,6 +4,34 @@ test.describe('Settings navigation', () => {
test('reports what is ready without dressing optional gaps as faults', async ({
page,
}) => {
+ // Keep this fixture independent of any backend on developer machines.
+ await page.route('**/api/**', route =>
+ route.fulfill({ status: 404, json: {} })
+ )
+ await page.route('**/api/settings', route =>
+ route.fulfill({
+ status: 200,
+ json: {
+ ui: { theme: 'snow', language: 'en', response_language: 'en' },
+ catalog: {
+ version: 1,
+ services: {
+ llm: { active_profile_id: null, profiles: [] },
+ task: { active_profile_id: null, profiles: [] },
+ embedding: { active_profile_id: null, profiles: [] },
+ search: { active_profile_id: null, profiles: [] },
+ tts: { active_profile_id: null, profiles: [] },
+ stt: { active_profile_id: null, profiles: [] },
+ imagegen: { active_profile_id: null, profiles: [] },
+ videogen: { active_profile_id: null, profiles: [] },
+ },
+ },
+ },
+ })
+ )
+ await page.route('**/api/settings/draft', route =>
+ route.fulfill({ status: 200, json: { draft: null } })
+ )
await page.route('**/api/settings/readiness', route =>
route.fulfill({
status: 200,
@@ -79,7 +107,7 @@ test.describe('Settings navigation', () => {
// The selected parser that cannot be reached is the one thing called out.
await expect(
- panel.getByText(/endpoint is unreachable|服务地址连不上/)
+ matrix.getByText(/endpoint is unreachable|服务地址连不上/)
).toBeVisible()
// The optional tool is folded behind its disclosure, not in the open list.
await expect(