fix: disable the quality choice while visuals are unavailable
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user