From: Jérôme Benoit Date: Thu, 30 Apr 2026 08:16:56 +0000 (+0200) Subject: fix(ui-web): add missing .js extensions to relative test imports X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5b2c268dda7857d092f0433fdb106559a6f3c4b6;p=e-mobility-charging-stations-simulator.git fix(ui-web): add missing .js extensions to relative test imports --- diff --git a/ui/web/tests/unit/UIClient.test.ts b/ui/web/tests/unit/UIClient.test.ts index fc1e8d69..62d7e3c3 100644 --- a/ui/web/tests/unit/UIClient.test.ts +++ b/ui/web/tests/unit/UIClient.test.ts @@ -16,9 +16,9 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { UIClient } from '@/core/index.js' -import { toastMock } from '../setup' -import { createUIServerConfig, TEST_HASH_ID, TEST_ID_TAG } from './constants' -import { MockWebSocket } from './helpers' +import { toastMock } from '../setup.js' +import { createUIServerConfig, TEST_HASH_ID, TEST_ID_TAG } from './constants.js' +import { MockWebSocket } from './helpers.js' // Reset singleton between tests beforeEach(() => { diff --git a/ui/web/tests/unit/Utils.test.ts b/ui/web/tests/unit/Utils.test.ts index 602a7818..d334cbca 100644 --- a/ui/web/tests/unit/Utils.test.ts +++ b/ui/web/tests/unit/Utils.test.ts @@ -18,7 +18,7 @@ import { } from '@/core/index.js' import { useFetchData } from '@/shared/composables/useFetchData.js' -import { toastMock } from '../setup' +import { toastMock } from '../setup.js' describe('Utils', () => { describe('localStorage utilities', () => { diff --git a/ui/web/tests/unit/shared/composables/useLayoutData.test.ts b/ui/web/tests/unit/shared/composables/useLayoutData.test.ts index 460816ec..b8e896cc 100644 --- a/ui/web/tests/unit/shared/composables/useLayoutData.test.ts +++ b/ui/web/tests/unit/shared/composables/useLayoutData.test.ts @@ -23,7 +23,7 @@ vi.mock('@/core/index.js', async importOriginal => { import { useLayoutData } from '@/shared/composables/useLayoutData.js' -import { createMockUIClient, type MockUIClient, withSetup } from '../../helpers' +import { createMockUIClient, type MockUIClient, withSetup } from '../../helpers.js' let mockClient: MockUIClient let chargingStations: Ref diff --git a/ui/web/tests/unit/shared/composables/useSimulatorControl.test.ts b/ui/web/tests/unit/shared/composables/useSimulatorControl.test.ts index b20edb59..63a223cb 100644 --- a/ui/web/tests/unit/shared/composables/useSimulatorControl.test.ts +++ b/ui/web/tests/unit/shared/composables/useSimulatorControl.test.ts @@ -18,7 +18,7 @@ import { } from '@/core/index.js' import { toastMock } from '../../../setup.js' -import { createUIServerConfig } from '../../constants' +import { createUIServerConfig } from '../../constants.js' import { createMockUIClient, type MockUIClient, withSetup } from '../../helpers.js' vi.mock('@/core/index.js', async importOriginal => { diff --git a/ui/web/tests/unit/skins/classic/ClassicLayout.test.ts b/ui/web/tests/unit/skins/classic/ClassicLayout.test.ts index 86e2e840..640ea515 100644 --- a/ui/web/tests/unit/skins/classic/ClassicLayout.test.ts +++ b/ui/web/tests/unit/skins/classic/ClassicLayout.test.ts @@ -9,8 +9,8 @@ import { ref } from 'vue' import { chargingStationsKey, configurationKey, templatesKey, uiClientKey } from '@/core/index.js' import ClassicLayout from '@/skins/classic/ClassicLayout.vue' -import { createUIServerConfig } from '../../constants' -import { createMockUIClient, type MockUIClient } from '../../helpers' +import { createUIServerConfig } from '../../constants.js' +import { createMockUIClient, type MockUIClient } from '../../helpers.js' vi.mock('vue-router', () => ({ useRoute: () => ref({ name: 'charging-stations', params: {} }), diff --git a/ui/web/tests/unit/skins/modern/ConnectorRow.test.ts b/ui/web/tests/unit/skins/modern/ConnectorRow.test.ts index 55bdecd1..0df05e53 100644 --- a/ui/web/tests/unit/skins/modern/ConnectorRow.test.ts +++ b/ui/web/tests/unit/skins/modern/ConnectorRow.test.ts @@ -15,7 +15,7 @@ import { uiClientKey } from '@/core/index.js' import ConnectorRow from '@/skins/modern/components/ConnectorRow.vue' import { toastMock } from '../../../setup.js' -import { TEST_HASH_ID, TEST_STATION_ID } from '../../constants' +import { TEST_HASH_ID, TEST_STATION_ID } from '../../constants.js' import { createMockUIClient, type MockUIClient } from '../../helpers.js' let mockClient: MockUIClient diff --git a/ui/web/tests/unit/skins/modern/Dialogs.test.ts b/ui/web/tests/unit/skins/modern/Dialogs.test.ts index feaec003..71e48e8f 100644 --- a/ui/web/tests/unit/skins/modern/Dialogs.test.ts +++ b/ui/web/tests/unit/skins/modern/Dialogs.test.ts @@ -30,7 +30,7 @@ import SetSupervisionUrlDialog from '@/skins/modern/components/dialogs/SetSuperv import StartTransactionDialog from '@/skins/modern/components/dialogs/StartTransactionDialog.vue' import { toastMock } from '../../../setup.js' -import { createChargingStationData, TEST_HASH_ID, TEST_STATION_ID } from '../../constants' +import { createChargingStationData, TEST_HASH_ID, TEST_STATION_ID } from '../../constants.js' import { createMockUIClient, type MockUIClient } from '../../helpers.js' let mockClient: MockUIClient diff --git a/ui/web/tests/unit/skins/modern/ModernLayout.test.ts b/ui/web/tests/unit/skins/modern/ModernLayout.test.ts index ddb0006f..5d652422 100644 --- a/ui/web/tests/unit/skins/modern/ModernLayout.test.ts +++ b/ui/web/tests/unit/skins/modern/ModernLayout.test.ts @@ -18,7 +18,7 @@ import { import ModernLayout from '@/skins/modern/ModernLayout.vue' import { toastMock } from '../../../setup.js' -import { createChargingStationData, createUIServerConfig } from '../../constants' +import { createChargingStationData, createUIServerConfig } from '../../constants.js' import { createMockUIClient, type MockUIClient } from '../../helpers.js' vi.mock('@/core/index.js', async importOriginal => { diff --git a/ui/web/tests/unit/skins/modern/SimulatorBar.test.ts b/ui/web/tests/unit/skins/modern/SimulatorBar.test.ts index c9806a90..01e6f3e6 100644 --- a/ui/web/tests/unit/skins/modern/SimulatorBar.test.ts +++ b/ui/web/tests/unit/skins/modern/SimulatorBar.test.ts @@ -7,7 +7,7 @@ import { describe, expect, it } from 'vitest' import SimulatorBar from '@/skins/modern/components/SimulatorBar.vue' -import { createUIServerConfig } from '../../constants' +import { createUIServerConfig } from '../../constants.js' const baseServer = createUIServerConfig({ name: 'Alpha' }) const altServer = createUIServerConfig({ host: 'beta', name: 'Beta' }) diff --git a/ui/web/tests/unit/skins/modern/StationCard.test.ts b/ui/web/tests/unit/skins/modern/StationCard.test.ts index 15072b74..6764af6a 100644 --- a/ui/web/tests/unit/skins/modern/StationCard.test.ts +++ b/ui/web/tests/unit/skins/modern/StationCard.test.ts @@ -15,7 +15,7 @@ import { createConnectorStatus, TEST_HASH_ID, TEST_STATION_ID, -} from '../../constants' +} from '../../constants.js' import { createMockUIClient, type MockUIClient } from '../../helpers.js' let mockClient: MockUIClient