Skip to content

Commit 21a1bfb

Browse files
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]
1 parent de49d33 commit 21a1bfb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

core/http/react-ui/e2e/forking-chat.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { test, expect } from './coverage-fixtures.js'
33
// Seeds two-message chat into localStorage so we don't need a live model.
44
async function seedChat(page, history) {
55
await page.addInitScript((h) => {
6+
if (localStorage.getItem('localai_chats_data')) return
67
const chat = {
78
id: 'seed1', name: 'Seeded Chat', model: 'test-model',
89
history: h, systemPrompt: '', mcpMode: false, mcpServers: [],

0 commit comments

Comments
 (0)