fix(desktop): persist mocked voice settings

Signed-off-by: John Tennant <jtennant@squareup.com>
This commit is contained in:
John Tennant
2026-07-29 12:20:47 -04:00
committed by John Tennant
parent fc61d30ecc
commit 5e70797c69
2 changed files with 11 additions and 2 deletions
+8 -2
View File
@@ -9737,7 +9737,10 @@ export function maybeInstallE2eTauriMocks() {
voicePreferences: activeConfig?.mock?.ttsSettings
?.voicePreferences ?? ["pocket:mary"],
};
if (activeConfig?.mock) activeConfig.mock.ttsSettings = settings;
if (activeConfig) {
activeConfig.mock ??= {};
activeConfig.mock.ttsSettings = settings;
}
return settings;
}
case "set_pocket_voice": {
@@ -9760,7 +9763,10 @@ export function maybeInstallE2eTauriMocks() {
voiceKey,
);
const settings = { ...current, voicePreferences: preferences };
if (activeConfig?.mock) activeConfig.mock.ttsSettings = settings;
if (activeConfig) {
activeConfig.mock ??= {};
activeConfig.mock.ttsSettings = settings;
}
return settings;
}
case "preview_pocket_voice":
+3
View File
@@ -29,6 +29,9 @@ test.describe("Pocket voice settings", () => {
);
await page.getByTestId("agent-text-to-speech-toggle").click();
await expect(
page.getByTestId("agent-text-to-speech-toggle"),
).toHaveAttribute("aria-checked", "false");
await expect(page.getByTestId("pocket-voice-controls")).toHaveAttribute(
"aria-disabled",
"true",