fix(frontend): recover startup and discard stale reasoning answers

This commit is contained in:
2026-10-07 09:24:31 -03:00
parent abd03ed07d
commit ff32c6a605
8 changed files with 280 additions and 41 deletions
+9
View File
@@ -43,6 +43,15 @@ afterEach(() => {
});
describe("React application", () => {
it("offers configuration retry without exposing a broken start control", async () => {
vi.mocked(fetch).mockRejectedValueOnce(new Error("offline"));
const user = userEvent.setup();
render(<App />);
await screen.findByRole("alert");
expect(screen.queryByRole("button", { name: "Iniciar conversación de voz" })).not.toBeInTheDocument();
await user.click(screen.getByRole("button", { name: "Reintentar" }));
expect(await screen.findByRole("button", { name: "Iniciar conversación de voz" })).toBeEnabled();
});
it("loads the configured theme and persists voice settings across remounts under StrictMode", async () => {
const user = userEvent.setup();
const view = render(