"eslint-plugin-vue": "^9.4.0",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
- "typescript": "^4.8.2"
+ "typescript": "~4.8.2"
}
},
"node_modules/@achrinza/node-ipc": {
"name": "webui",
"version": "0.1.0",
"scripts": {
- "start": "npm run build && node start.js",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
- "test": "vue-cli-service test:unit",
"lint": "vue-cli-service lint",
- "lint:fix": "vue-cli-service lint --fix"
+ "lint:fix": "vue-cli-service lint --fix",
+ "start": "npm run build && node start.js",
+ "test": "vue-cli-service test:unit"
},
"dependencies": {
"core-js": "^3.25.0",
"eslint-plugin-vue": "^9.4.0",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
- "typescript": "^4.8.2"
+ "typescript": "~4.8.2"
},
"_id": "webui@0.1.0",
"gitHooks": {
// import { reactive } from 'vue';
import UIClient from '@/composable/UIClient';
-import { ConnectorStatus } from '@/type/ChargingStationType';
+import type { ConnectorStatus } from '@/type/ChargingStationType';
// import Utils from '@/composable/Utils';
const props = defineProps<{
// import { reactive } from 'vue';
import Utils from '@/composable/Utils';
-import {
+import type {
ChargingStationData,
ChargingStationInfo,
ConnectorStatus,
<script setup lang="ts">
import Modal from '@/components/Modal.vue';
-import { ChargingStationInfo } from '@/type/ChargingStationType';
+import type { ChargingStationInfo } from '@/type/ChargingStationType';
const props = defineProps<{
isVisible: boolean;
<script setup lang="ts">
import CSData from './CSData.vue';
-import { ChargingStationData } from '@/type/ChargingStationType';
+import type { ChargingStationData } from '@/type/ChargingStationType';
const props = defineProps<{
chargingStations: Record<string, ChargingStationData>;
import { onMounted, reactive } from 'vue';
import UIClient from '@/composable/UIClient';
-import { ChargingStationData } from '@/type/ChargingStationType';
+import type { ChargingStationData } from '@/type/ChargingStationType';
const UIClientInstance = UIClient.instance;
--- /dev/null
+import { expect } from 'chai';
+import { shallowMount } from '@vue/test-utils';
+import CSTable from '@/components/charging-stations/CSTable.vue';
+import type { ChargingStationData } from '@/type/ChargingStationType';
+
+describe('CSTable.vue', () => {
+ it('renders CS table columns name', () => {
+ const chargingStations: Record<string, ChargingStationData> = {
+ '0': {} as unknown as ChargingStationData,
+ };
+ const wrapper = shallowMount(CSTable, {
+ props: { chargingStations, idTag: '0' },
+ });
+ console.log(wrapper.text());
+ expect(wrapper.text()).to.include('Action');
+ expect(wrapper.text()).to.include('Connector');
+ expect(wrapper.text()).to.include('Status');
+ expect(wrapper.text()).to.include('Transaction');
+ expect(wrapper.text()).to.include('Name');
+ expect(wrapper.text()).to.include('Stopped');
+ expect(wrapper.text()).to.include('Registration Status');
+ expect(wrapper.text()).to.include('Vendor');
+ expect(wrapper.text()).to.include('Model');
+ expect(wrapper.text()).to.include('Firmware Version');
+ });
+});