@@ -110,64 +110,48 @@ describe('CSConnector', () => {
110110 expect ( cells [ 0 ] . text ( ) ) . toBe ( '1/3' )
111111 } )
112112
113- it ( 'should render connector status' , ( ) => {
114- const wrapper = mountConnector ( {
115- connectorOverrides : { status : OCPP16ChargePointStatus . CHARGING } ,
116- } )
117- const cells = wrapper . findAll ( 'td' )
118- expect ( cells [ 1 ] . text ( ) ) . toBe ( 'Charging' )
119- } )
120-
121- it ( 'should render placeholder when status is undefined' , ( ) => {
122- const wrapper = mountConnector ( {
123- connectorOverrides : { status : undefined } ,
124- } )
125- const cells = wrapper . findAll ( 'td' )
126- expect ( cells [ 1 ] . text ( ) ) . toBe ( 'Ø' )
127- } )
128-
129113 it ( 'should render "Yes" when locked' , ( ) => {
130114 const wrapper = mountConnector ( {
131115 connectorOverrides : { locked : true } ,
132116 } )
133117 const cells = wrapper . findAll ( 'td' )
134- expect ( cells [ 2 ] . text ( ) ) . toBe ( 'Yes' )
118+ expect ( cells [ 1 ] . text ( ) ) . toBe ( 'Yes' )
135119 } )
136120
137121 it ( 'should render "No" when not locked' , ( ) => {
138122 const wrapper = mountConnector ( {
139123 connectorOverrides : { locked : false } ,
140124 } )
141125 const cells = wrapper . findAll ( 'td' )
142- expect ( cells [ 2 ] . text ( ) ) . toBe ( 'No' )
126+ expect ( cells [ 1 ] . text ( ) ) . toBe ( 'No' )
143127 } )
144128
145129 it ( 'should render transaction info when transaction is started' , ( ) => {
146130 const wrapper = mountConnector ( {
147131 connectorOverrides : { transactionId : 42 , transactionStarted : true } ,
148132 } )
149133 const cells = wrapper . findAll ( 'td' )
150- expect ( cells [ 3 ] . text ( ) ) . toBe ( 'Yes (42)' )
134+ expect ( cells [ 2 ] . text ( ) ) . toBe ( 'Yes (42)' )
151135 } )
152136
153137 it ( 'should render "No" when no transaction' , ( ) => {
154138 const wrapper = mountConnector ( {
155139 connectorOverrides : { transactionStarted : false } ,
156140 } )
157141 const cells = wrapper . findAll ( 'td' )
158- expect ( cells [ 3 ] . text ( ) ) . toBe ( 'No' )
142+ expect ( cells [ 2 ] . text ( ) ) . toBe ( 'No' )
159143 } )
160144
161145 it ( 'should render ATG started "Yes" when atgStatus.start is true' , ( ) => {
162146 const wrapper = mountConnector ( { atgStatus : { start : true } } )
163147 const cells = wrapper . findAll ( 'td' )
164- expect ( cells [ 4 ] . text ( ) ) . toBe ( 'Yes' )
148+ expect ( cells [ 3 ] . text ( ) ) . toBe ( 'Yes' )
165149 } )
166150
167151 it ( 'should render ATG started "No" when atgStatus is undefined' , ( ) => {
168152 const wrapper = mountConnector ( { atgStatus : undefined } )
169153 const cells = wrapper . findAll ( 'td' )
170- expect ( cells [ 4 ] . text ( ) ) . toBe ( 'No' )
154+ expect ( cells [ 3 ] . text ( ) ) . toBe ( 'No' )
171155 } )
172156 } )
173157
@@ -262,37 +246,37 @@ describe('CSConnector', () => {
262246
263247 it ( 'should render OCPP 1.6 status options by default' , ( ) => {
264248 const wrapper = mountConnector ( )
265- const selects = wrapper . findAll ( 'select.connector-status -select' )
249+ const selects = wrapper . findAll ( 'select.connector-action -select' )
266250 const statusSelect = selects [ 0 ]
267251 const options = statusSelect . findAll ( 'option' )
268252 expect ( options . length ) . toBe ( Object . values ( OCPP16ChargePointStatus ) . length )
269253 } )
270254
271255 it ( 'should render OCPP 2.0.x status options for OCPP 2.0.1 station' , ( ) => {
272256 const wrapper = mountConnector ( { ocppVersion : OCPPVersion . VERSION_201 } )
273- const selects = wrapper . findAll ( 'select.connector-status -select' )
257+ const selects = wrapper . findAll ( 'select.connector-action -select' )
274258 const statusSelect = selects [ 0 ]
275259 const options = statusSelect . findAll ( 'option' )
276260 expect ( options . length ) . toBe ( Object . values ( OCPP20ConnectorStatusEnumType ) . length )
277261 } )
278262
279263 it ( 'should hide error code select for OCPP 2.0.x' , ( ) => {
280264 const wrapper = mountConnector ( { ocppVersion : OCPPVersion . VERSION_201 } )
281- const selects = wrapper . findAll ( 'select.connector-status -select' )
265+ const selects = wrapper . findAll ( 'select.connector-action -select' )
282266 expect ( selects . length ) . toBe ( 1 )
283267 } )
284268
285269 it ( 'should show error code select for OCPP 1.6' , ( ) => {
286270 const wrapper = mountConnector ( { ocppVersion : OCPPVersion . VERSION_16 } )
287- const selects = wrapper . findAll ( 'select.connector-status -select' )
271+ const selects = wrapper . findAll ( 'select.connector-action -select' )
288272 expect ( selects . length ) . toBe ( 2 )
289273 const errorOptions = selects [ 1 ] . findAll ( 'option' )
290274 expect ( errorOptions . length ) . toBe ( Object . values ( OCPP16ChargePointErrorCode ) . length )
291275 } )
292276
293277 it ( 'should call setConnectorStatus on status change' , async ( ) => {
294278 const wrapper = mountConnector ( )
295- const selects = wrapper . findAll ( 'select.connector-status -select' )
279+ const selects = wrapper . findAll ( 'select.connector-action -select' )
296280 await selects [ 0 ] . setValue ( OCPP16ChargePointStatus . FAULTED )
297281 await flushPromises ( )
298282 expect ( mockClient . setConnectorStatus ) . toHaveBeenCalledWith (
0 commit comments