test: align widget modernization fixtures
This commit is contained in:
1 parent
8775597d5a
commit
29f7c35fc1
1 file changed
+6
-21
@@ -1,16 +1,9 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { definition as appDefinition } from "./app";
|
||||
import { definition as beszelAlertsDefinition } from "./beszel-alerts";
|
||||
import { definition as beszelSystemGridDefinition } from "./beszel-system-grid";
|
||||
import { definition as beszelSystemStatsDefinition } from "./beszel-system-stats";
|
||||
import { definition as beszelSystemTableDefinition } from "./beszel-system-table";
|
||||
import { definition as clockDefinition } from "./clock";
|
||||
import { definition as customApiDefinition } from "./custom-api";
|
||||
import { getWidgetQueryKeys, supportsAdvancedFocus } from "./definition";
|
||||
import { definition as dockerDefinition } from "./docker";
|
||||
import { definition as downloadsDefinition } from "./downloads";
|
||||
import { definition as indexerManagerDefinition } from "./indexer-manager";
|
||||
import { definition as notebookDefinition } from "./notebook";
|
||||
|
||||
describe("getWidgetQueryKeys", () => {
|
||||
test("falls back to the widget router namespace", () => {
|
||||
@@ -32,20 +25,12 @@ describe("getWidgetQueryKeys", () => {
|
||||
});
|
||||
|
||||
describe("supportsAdvancedFocus", () => {
|
||||
test.each([
|
||||
appDefinition,
|
||||
beszelAlertsDefinition,
|
||||
beszelSystemGridDefinition,
|
||||
beszelSystemStatsDefinition,
|
||||
beszelSystemTableDefinition,
|
||||
clockDefinition,
|
||||
customApiDefinition,
|
||||
dockerDefinition,
|
||||
indexerManagerDefinition,
|
||||
notebookDefinition,
|
||||
])("keeps non-enhanced widgets compact", (widgetDefinition) => {
|
||||
expect(supportsAdvancedFocus(widgetDefinition)).toBe(false);
|
||||
});
|
||||
test.each([appDefinition, dockerDefinition, customApiDefinition])(
|
||||
"keeps non-enhanced widgets compact",
|
||||
(widgetDefinition) => {
|
||||
expect(supportsAdvancedFocus(widgetDefinition)).toBe(false);
|
||||
},
|
||||
);
|
||||
|
||||
test("requires an explicit opt-in", () => {
|
||||
expect(supportsAdvancedFocus({})).toBe(false);
|
||||
|
||||
Reference in new issue
Block a user