fix: read Static and disable quality when a system setting withholds the scene

This commit is contained in:
2026-10-11 02:06:45 +03:00
parent 06d7219054
commit 054407aa5c
2 changed files with 27 additions and 4 deletions

View File

@@ -390,6 +390,25 @@ describe("DriveControls", () => {
expect(select.element.value).toBe("static");
wrapper.unmount();
});
it.each(["system-reduce", "data-saver"] as const)(
"disables the quality choice and reads Static under %s",
async (reason) => {
const wrapper = mount(DriveControls, {
props: {
policy: policy({ reason, allowSceneRequest: false, allowAutomaticVideo: false, maximumTier: "static" }),
maximumQuality: "high",
sceneStatus: "idle",
audioState: { kind: "idle" },
},
});
await wrapper.get('[aria-label="Drive settings"]').trigger("click");
const select = wrapper.get<HTMLSelectElement>('[aria-label="Quality control"]');
expect(select.element.disabled).toBe(true);
expect(select.element.value).toBe("static");
wrapper.unmount();
},
);
});
describe("JourneyHud", () => {