]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor(webui): harmonize barrel usage in types and composables
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 19 Mar 2026 15:27:49 +0000 (16:27 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 19 Mar 2026 15:27:49 +0000 (16:27 +0100)
Add OCPP16AvailabilityType, OCPP16ChargePointStatus, and
OCPP16RegistrationStatus to the types barrel. Redirect all direct
module imports in tests to use barrels (types/, composables/).

ui/web/src/types/index.ts
ui/web/tests/unit/CSConnector.test.ts
ui/web/tests/unit/CSData.test.ts
ui/web/tests/unit/ChargingStationsView.test.ts
ui/web/tests/unit/StartTransaction.test.ts
ui/web/tests/unit/constants.ts

index 2eb33c9063e3119b5f7c41a7438f719cfc7d1c90..e2008a0674e370de27ad075725d34ce5eaed01ac 100644 (file)
@@ -11,6 +11,9 @@ export type {
   Status,
 } from './ChargingStationType'
 export {
+  OCPP16AvailabilityType,
+  OCPP16ChargePointStatus,
+  OCPP16RegistrationStatus,
   OCPP20IdTokenEnumType,
   OCPP20TransactionEventEnumType,
   OCPPVersion,
index 84ecb5284dc3fdfeb6af2aa08aafa3087d2ec17f..3b204a599f7c44ee31bcd31fc60ee75ae254f5f0 100644 (file)
@@ -5,11 +5,11 @@
 import { flushPromises, mount } from '@vue/test-utils'
 import { beforeEach, describe, expect, it, vi } from 'vitest'
 
-import type { UIClient } from '@/composables/UIClient'
+import type { UIClient } from '@/composables'
 
 import CSConnector from '@/components/charging-stations/CSConnector.vue'
 import { useUIClient } from '@/composables'
-import { OCPP16ChargePointStatus } from '@/types/ChargingStationType'
+import { OCPP16ChargePointStatus } from '@/types'
 
 import { toastMock } from '../setup'
 import { createConnectorStatus, TEST_HASH_ID, TEST_STATION_ID } from './constants'
index 2d3f464348ff6ee88c6f7c8303adc608f5bac336..b5bbbe1d74ab15ce81a5d2c27a7f5dad79c064f1 100644 (file)
@@ -5,7 +5,7 @@
 import { flushPromises, mount } from '@vue/test-utils'
 import { beforeEach, describe, expect, it, vi } from 'vitest'
 
-import type { UIClient } from '@/composables/UIClient'
+import type { UIClient } from '@/composables'
 import type { ChargingStationData } from '@/types'
 
 import CSConnector from '@/components/charging-stations/CSConnector.vue'
index b57c32fc07bd7f9a5e8fd25c0c5289403ec68ce7..9a682d1bf93abf31e23ae7e4ade0860a8ba7e4e2 100644 (file)
@@ -7,7 +7,7 @@ import { flushPromises, mount } from '@vue/test-utils'
 import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
 import { ref } from 'vue'
 
-import type { UIClient } from '@/composables/UIClient'
+import type { UIClient } from '@/composables'
 
 import { useUIClient } from '@/composables'
 import { ResponseStatus } from '@/types'
index 26c4aaf18946f2b115caae20f1c9a2a461b054f2..4f00c97b220ecdecdeb649b615f74883e14227d5 100644 (file)
@@ -5,7 +5,7 @@
 import { flushPromises, mount } from '@vue/test-utils'
 import { describe, expect, it, vi } from 'vitest'
 
-import type { UIClient } from '@/composables/UIClient'
+import type { UIClient } from '@/composables'
 
 import StartTransaction from '@/components/actions/StartTransaction.vue'
 import { useUIClient } from '@/composables'
index 62863338a99a311841a0b76f2614266b4c50bcfa..3a57a109afe13bc145fd2b3dd49bbbee543572e8 100644 (file)
@@ -8,16 +8,14 @@ import {
   type ChargingStationInfo,
   type ConnectorStatus,
   type EvseEntry,
+  OCPP16AvailabilityType,
+  OCPP16ChargePointStatus,
+  OCPP16RegistrationStatus,
   OCPPVersion,
   Protocol,
   ProtocolVersion,
   type UIServerConfigurationSection,
 } from '@/types'
-import {
-  OCPP16AvailabilityType,
-  OCPP16ChargePointStatus,
-  OCPP16RegistrationStatus,
-} from '@/types/ChargingStationType'
 
 // ── Shared Test Constants ─────────────────────────────────────────────────────