summaryrefslogtreecommitdiffhomepage
path: root/packages/app/e2e
diff options
context:
space:
mode:
authorAdam <[email protected]>2026-02-12 15:03:02 -0600
committerAdam <[email protected]>2026-02-12 15:03:05 -0600
commit4e0f509e7b7d84395a541bdfa658f6c98f588221 (patch)
tree45912ad3c9b0d9cc532fa4d72fe20938a1273090 /packages/app/e2e
parentff3b174c423d89b39ee8154863840e48c8aac371 (diff)
downloadopencode-4e0f509e7b7d84395a541bdfa658f6c98f588221.tar.gz
opencode-4e0f509e7b7d84395a541bdfa658f6c98f588221.zip
feat(app): option to turn off sound effects
Diffstat (limited to 'packages/app/e2e')
-rw-r--r--packages/app/e2e/selectors.ts3
-rw-r--r--packages/app/e2e/settings/settings.spec.ts25
2 files changed, 28 insertions, 0 deletions
diff --git a/packages/app/e2e/selectors.ts b/packages/app/e2e/selectors.ts
index 842433891..52c9007ea 100644
--- a/packages/app/e2e/selectors.ts
+++ b/packages/app/e2e/selectors.ts
@@ -10,8 +10,11 @@ export const settingsNotificationsAgentSelector = '[data-action="settings-notifi
export const settingsNotificationsPermissionsSelector = '[data-action="settings-notifications-permissions"]'
export const settingsNotificationsErrorsSelector = '[data-action="settings-notifications-errors"]'
export const settingsSoundsAgentSelector = '[data-action="settings-sounds-agent"]'
+export const settingsSoundsAgentEnabledSelector = '[data-action="settings-sounds-agent-enabled"]'
export const settingsSoundsPermissionsSelector = '[data-action="settings-sounds-permissions"]'
+export const settingsSoundsPermissionsEnabledSelector = '[data-action="settings-sounds-permissions-enabled"]'
export const settingsSoundsErrorsSelector = '[data-action="settings-sounds-errors"]'
+export const settingsSoundsErrorsEnabledSelector = '[data-action="settings-sounds-errors-enabled"]'
export const settingsUpdatesStartupSelector = '[data-action="settings-updates-startup"]'
export const settingsReleaseNotesSelector = '[data-action="settings-release-notes"]'
diff --git a/packages/app/e2e/settings/settings.spec.ts b/packages/app/e2e/settings/settings.spec.ts
index 42534968b..9fbcf79f5 100644
--- a/packages/app/e2e/settings/settings.spec.ts
+++ b/packages/app/e2e/settings/settings.spec.ts
@@ -9,6 +9,7 @@ import {
settingsNotificationsPermissionsSelector,
settingsReleaseNotesSelector,
settingsSoundsAgentSelector,
+ settingsSoundsAgentEnabledSelector,
settingsSoundsErrorsSelector,
settingsSoundsPermissionsSelector,
settingsThemeSelector,
@@ -335,6 +336,30 @@ test("changing sound agent selection persists in localStorage", async ({ page, g
expect(stored?.sounds?.agent).not.toBe("staplebops-01")
})
+test("disabling agent sound disables sound selection", async ({ page, gotoSession }) => {
+ await gotoSession()
+
+ const dialog = await openSettings(page)
+ const select = dialog.locator(settingsSoundsAgentSelector)
+ const switchContainer = dialog.locator(settingsSoundsAgentEnabledSelector)
+ const trigger = select.locator('[data-slot="select-select-trigger"]')
+ await expect(select).toBeVisible()
+ await expect(switchContainer).toBeVisible()
+ await expect(trigger).toBeEnabled()
+
+ await switchContainer.locator('[data-slot="switch-control"]').click()
+ await page.waitForTimeout(100)
+
+ await expect(trigger).toBeDisabled()
+
+ const stored = await page.evaluate((key) => {
+ const raw = localStorage.getItem(key)
+ return raw ? JSON.parse(raw) : null
+ }, settingsKey)
+
+ expect(stored?.sounds?.agentEnabled).toBe(false)
+})
+
test("changing permissions and errors sounds updates localStorage", async ({ page, gotoSession }) => {
await gotoSession()