Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Make the drag preferences test compile, and ask the stricter question (#11503)

Daniel Han5e045904c55b
diff --git a/studio/frontend/tests/sidebar-row-drag.test.ts b/studio/frontend/tests/sidebar-row-drag.test.ts
index f78d84746e8..5009caec8c6 100644
--- a/studio/frontend/tests/sidebar-row-drag.test.ts
+++ b/studio/frontend/tests/sidebar-row-drag.test.ts
@@ -903,9 +903,13 @@ test("the hint beside the cursor names every kind of drop", () => {
// The gesture has one behaviour, not three switches: the hint shows, a reorder in a sorted list
// switches it to Manual, and a closed folder opens under a resting pointer. Nothing to persist.
test("drag-and-drop has no preferences of its own", () => {
- const state = useSidebarOrganizationStore.getState() as Record<string, unknown>;
+ // `in`, not an indexed read through a cast: SidebarOrganizationState has no index
+ // signature, so `as Record<string, unknown>` is a conversion tsc rejects outright and
+ // the test never compiled. `in` needs no cast and asks the stricter question anyway,
+ // since a key that came back holding undefined is still back in the store.
+ const state: object = useSidebarOrganizationStore.getState();
for (const key of ["dragHints", "reorderSwitchesSort", "dragOpensFolders"]) {
- assert.equal(state[key], undefined, `${key} is back in the store`);
+ assert.ok(!(key in state), `${key} is back in the store`);
assert.ok(!EN.includes(`${key}:`), `${key} is back in the en locale`);
}
assert.ok(!EN.includes("dragDrop:"));