mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-10-21 06:51:24 +02:00
feat: interface sounds
This commit is contained in:
1 parent
2cc91ed250
commit
38ab1f1a2d
20 files changed
+544
-12
No files matched your search
@@ -156,6 +156,9 @@ export class AppSession {
|
||||
// A tip opening by itself mid-test is a modal nobody asked for;
|
||||
// the tips suite turns it back on for the one session that wants it.
|
||||
tips_auto_show: false,
|
||||
// Hundreds of scripted clicks must not play through the speakers
|
||||
// of the machine running the suite.
|
||||
ui_sounds: false,
|
||||
...this.settings,
|
||||
},
|
||||
null,
|
||||
|
||||
@@ -2279,6 +2279,24 @@ test("first-run onboarding stays recoverable, responsive, and platform-aware", a
|
||||
);
|
||||
});
|
||||
|
||||
test("interface sounds turn on and off in Appearance and stay as saved", async () => {
|
||||
await withApp("ui-sounds-setting", async (app) => {
|
||||
const sounds = async () => (await app.invoke("get_app_settings")).ui_sounds;
|
||||
assert.equal(await sounds(), false, "the harness keeps the suite silent");
|
||||
await app.clickSelector('[aria-label="Settings"]');
|
||||
await app.waitForText(en.settings.appearance.soundsDescription);
|
||||
const toggle = `[role="switch"][aria-label="${en.settings.appearance.sounds}"]`;
|
||||
await app.clickSelector(toggle);
|
||||
await saveSettings(app);
|
||||
assert.equal(await sounds(), true);
|
||||
await app.clickSelector(toggle);
|
||||
await saveSettings(app);
|
||||
assert.equal(await sounds(), false);
|
||||
await app.restart();
|
||||
assert.equal(await sounds(), false, "the choice survives a restart");
|
||||
});
|
||||
});
|
||||
|
||||
test("predefined theme remains rendered across navigation and restart", async () => {
|
||||
await withApp("ui-theme-predefined", async (app) => {
|
||||
await app.clickSelector('[aria-label="Settings"]');
|
||||
|
||||
Reference in new issue
Block a user