diff --git a/src/sidebar/activateMod/ActivateModPanel.test.tsx b/src/sidebar/activateMod/ActivateModPanel.test.tsx index 792388d412..32e79609c1 100644 --- a/src/sidebar/activateMod/ActivateModPanel.test.tsx +++ b/src/sidebar/activateMod/ActivateModPanel.test.tsx @@ -162,7 +162,7 @@ function setupMocksAndRender( appApiMock.onGet().reply(200, []); const entry = sidebarEntryFactory("activateMods", { - modIds: [modDefinition.metadata.id], + mods: [{ modId: modDefinition.metadata.id, initialOptions: {} }], heading: "Activate Mod", }); diff --git a/src/store/sidebar/eventKeyUtils.test.ts b/src/store/sidebar/eventKeyUtils.test.ts index 7cc9dc6526..2141492539 100644 --- a/src/store/sidebar/eventKeyUtils.test.ts +++ b/src/store/sidebar/eventKeyUtils.test.ts @@ -148,10 +148,10 @@ describe("eventKeyForEntry", () => { expect(eventKeyForEntry(value)).toBeNull(); }); - it("uses modId for activateRecipe", () => { + it("uses modId for activateMods", () => { const modId = validateRegistryId("@test/test-recipe"); const entry = sidebarEntryFactory("activateMods", { - modComponentRef: modComponentRefFactory({ blueprintId: modId }), + mods: [{ modId, initialOptions: {} }], }); // Main part is an object hash of the mod ids expect(eventKeyForEntry(entry)).toStartWith("activate-"); diff --git a/src/testUtils/factories/sidebarEntryFactories.ts b/src/testUtils/factories/sidebarEntryFactories.ts index 7aa6cc1f5f..db2705f307 100644 --- a/src/testUtils/factories/sidebarEntryFactories.ts +++ b/src/testUtils/factories/sidebarEntryFactories.ts @@ -73,27 +73,27 @@ const panelEntryFactory = define({ heading: (n: number) => `Panel Test ${n}`, payload: null, }); -export function sidebarEntryFactory( +export function sidebarEntryFactory( type: "panel", - override?: FactoryConfig, + override?: FactoryConfig, ): PanelEntry; -export function sidebarEntryFactory( +export function sidebarEntryFactory( type: "temporaryPanel", - override?: FactoryConfig, + override?: FactoryConfig, ): TemporaryPanelEntry; -export function sidebarEntryFactory( +export function sidebarEntryFactory( type: "form", - override?: FactoryConfig, + override?: FactoryConfig, ): FormPanelEntry; -export function sidebarEntryFactory( +export function sidebarEntryFactory( type: "activateMods", - override?: FactoryConfig, + override?: FactoryConfig, ): ModActivationPanelEntry; -export function sidebarEntryFactory( +export function sidebarEntryFactory( type: "staticPanel", - override?: FactoryConfig, + override?: FactoryConfig, ): StaticPanelEntry; -export function sidebarEntryFactory( +export function sidebarEntryFactory( type: EntryType, override?: FactoryConfig, ): SidebarEntry {