mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
fix(desktop): persist mocked voice settings
Signed-off-by: John Tennant <jtennant@squareup.com>
This commit is contained in:
committed by
John Tennant
parent
fc61d30ecc
commit
5e70797c69
@@ -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":
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user