diff --git a/webapp/src/tests/unit/allComponents.spec.js b/webapp/src/tests/unit/allComponents.spec.js index 05572d19..ca98e99d 100644 --- a/webapp/src/tests/unit/allComponents.spec.js +++ b/webapp/src/tests/unit/allComponents.spec.js @@ -110,7 +110,9 @@ describe("Unit Test", () => { * Look up the specific config for this file, default to an empty object * Override specific props * Inject the specific state if it exists, otherwise use empty object - * Mocks values come from MIXINS + * * Note on Global Mocks: + * The mock functions below stub out standard Mixin methods that typically interact with the Pinia store. + * These should not be moved to `overrides.js` Defining them here significantly reduces boilerplate configuration inside `overrides.js`. */ const testRunner = isSkipped ? it.skip : it; @@ -138,6 +140,14 @@ describe("Unit Test", () => { actions: {}, properties: {}, })), + thingDescriptions: vi.fn(() => ({ + test_thing: { + properties: { + test_property_1: {}, + test_property_2: {}, + }, + }, + })), getOngoingAction: vi.fn(() => Promise.resolve()), getThingEndpoint: vi.fn(() => Promise.resolve([])), modalError: "", diff --git a/webapp/src/tests/unit/overrides.js b/webapp/src/tests/unit/overrides.js index cc07fb8f..39fc3dd0 100644 --- a/webapp/src/tests/unit/overrides.js +++ b/webapp/src/tests/unit/overrides.js @@ -13,56 +13,7 @@ export const componentOverrides = { propertyName: "", thingName: "", }, - global: { - mocks: { - wotStore: { - thingDescriptions: { - test_thing: { - properties: { - test_property_1: {}, - test_property_2: {}, - }, - }, - }, - }, - }, - }, }, - - "slideScanContent.vue": { - global: { - mocks: { - wotStore: { - thingDescriptions: { - test_thing: { - properties: { - test_property_1: {}, - test_property_2: {}, - }, - }, - }, - }, - }, - }, - }, - - "slideScanControls.vue": { - global: { - mocks: { - wotStore: { - thingDescriptions: { - test_thing: { - properties: { - test_property_1: {}, - test_property_2: {}, - }, - }, - }, - }, - }, - }, - }, - "miniStreamDisplay.vue": { props: { streamId: "testProp" }, }, @@ -112,7 +63,6 @@ export const componentOverrides = { "inputFromSchema.vue": { props: { dataSchema: {} }, }, - "propertyControl.vue": { props: { propertyName: "", @@ -173,16 +123,4 @@ export const componentOverrides = { "cameraCalibrationSettings.vue": { props: { cameraUri: "" }, }, - - "CSMCalibrationSettings.vue": { - global: { - mocks: { - thingDescriptions: { - csm: { - actions: {}, - }, - }, - }, - }, - }, };