fix: disable the quality choice while visuals are unavailable

This commit is contained in:
2026-10-11 01:22:52 +03:00
parent 1bccb7548f
commit 863a44e65b
2 changed files with 26 additions and 1 deletions

View File

@@ -374,6 +374,22 @@ describe("DriveControls", () => {
expect(wrapper.find('[role="dialog"]').exists()).toBe(false);
expect(wrapper.get('[role="status"]').text()).toBe("Visuals unavailable");
});
it("disables the quality choice and reads Static while visuals are unavailable", async () => {
const wrapper = mount(DriveControls, {
props: {
policy: policy(),
maximumQuality: "high",
sceneStatus: "failed",
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", () => {