From 21a1bfb006158f0aee46709cd4cf2974431b1dd2 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Fri, 31 Jul 2026 03:16:20 +0000 Subject: [PATCH] test(chat): preserve seeded conversation on reload The saved-message edit test reloads the page to verify persistence, but its init script was replacing localStorage with the original fixture on every navigation. Seed only an empty store so reloads exercise the data written by the application. Assisted-by: Codex:gpt-5 [Codex] --- core/http/react-ui/e2e/forking-chat.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/http/react-ui/e2e/forking-chat.spec.js b/core/http/react-ui/e2e/forking-chat.spec.js index b9424587c..3b26686de 100644 --- a/core/http/react-ui/e2e/forking-chat.spec.js +++ b/core/http/react-ui/e2e/forking-chat.spec.js @@ -3,6 +3,7 @@ import { test, expect } from './coverage-fixtures.js' // Seeds two-message chat into localStorage so we don't need a live model. async function seedChat(page, history) { await page.addInitScript((h) => { + if (localStorage.getItem('localai_chats_data')) return const chat = { id: 'seed1', name: 'Seeded Chat', model: 'test-model', history: h, systemPrompt: '', mcpMode: false, mcpServers: [],