b6084d9c2c4f010b3f97e24e85577772ff6bd35b
[e-mobility-charging-stations-simulator.git] / src / ui / web / tests / unit / CSTable.spec.ts
1 import { expect } from 'chai';
2 import { shallowMount } from '@vue/test-utils';
3 import CSTable from '@/components/charging-stations/CSTable.vue';
4 import type { ChargingStationData } from '@/types/ChargingStationType';
5
6 describe('CSTable.vue', () => {
7 it('renders CS table columns name', () => {
8 const chargingStations: Record<string, ChargingStationData> = {
9 '0': {
10 stationInfo: {
11 hashId: '0',
12 },
13 } as unknown as ChargingStationData,
14 };
15 const wrapper = shallowMount(CSTable, {
16 props: { chargingStations, idTag: '0' },
17 });
18 expect(wrapper.text()).to.include('Action');
19 expect(wrapper.text()).to.include('Connector');
20 expect(wrapper.text()).to.include('Status');
21 expect(wrapper.text()).to.include('Transaction');
22 expect(wrapper.text()).to.include('Name');
23 expect(wrapper.text()).to.include('Stopped');
24 expect(wrapper.text()).to.include('Registration Status');
25 expect(wrapper.text()).to.include('Vendor');
26 expect(wrapper.text()).to.include('Model');
27 expect(wrapper.text()).to.include('Firmware Version');
28 });
29 });