@@ -118,8 +118,8 @@ const secondUpdateActualTexts = [
118118 { date : nextWeekDates [ 2 ] , start1StartedAt : '07:15' , stop1StoppedAt : '16:00' , pause1Id : '01:00' , start2StartedAt : '17:00' , stop2StoppedAt : '20:00' , pause2Id : '00:30' , plannedHours : '8:00' , flexBalanceToDate : 'swap_vert97.03' , flexToDate : '97.03' , flexIncludingToday : '97.03' , nettoHours : '10.25' , todaysFlex : '0.00' , paidOutFlex : 0 , calculatedHours : '10.25' } ,
119119 { date : nextWeekDates [ 3 ] , start1StartedAt : '06:00' , stop1StoppedAt : '12:00' , pause1Id : '00:30' , start2StartedAt : '18:00' , stop2StoppedAt : '20:00' , pause2Id : '00:30' , plannedHours : '8:00' , flexBalanceToDate : 'swap_vert97.03' , flexToDate : '97.03' , flexIncludingToday : '97.03' , nettoHours : '7.00' , todaysFlex : '0.00' , paidOutFlex : 0 , calculatedHours : '7' } ,
120120 { date : nextWeekDates [ 4 ] , start1StartedAt : '06:00' , stop1StoppedAt : '12:00' , pause1Id : '01:50' , start2StartedAt : '18:00' , stop2StoppedAt : '20:00' , pause2Id : '01:50' , plannedHours : '8.0' , flexBalanceToDate : 'swap_vert94.70' , flexToDate : '97.03' , flexIncludingToday : '94.70' , nettoHours : '4.33' , todaysFlex : '-2.33' , paidOutFlex : 0 , calculatedHours : 6.666666666666667 } ,
121- { date : nextWeekDates [ 5 ] , start1StartedAt : '00:00 ' , stop1StoppedAt : '00:00 ' , pause1Id : '00:00 ' , start2StartedAt : '00:00 ' , stop2StoppedAt : '00:00 ' , pause2Id : '00:00 ' , plannedHours : '' , flexBalanceToDate : 'swap_vert88.36' , flexToDate : '94.70' , flexIncludingToday : '88.36' , nettoHours : '0.00' , todaysFlex : '-6.33' , paidOutFlex : 0 , calculatedHours : 6.333333333333333 } ,
122- { date : lastWeekDates [ 6 ] , start1StartedAt : '06:00' , stop1StoppedAt : '14:00' , pause1Id : '00:30' , start2StartedAt : '00:00 ' , stop2StoppedAt : '00:00 ' , pause2Id : '00:00 ' , plannedHours : '8:00' , flexBalanceToDate : 'swap_vert88.36' , flexToDate : '88.36' , flexIncludingToday : '88.36' , nettoHours : '7.50' , todaysFlex : '0.00' , paidOutFlex : 0 , calculatedHours : '7.5' }
121+ { date : nextWeekDates [ 5 ] , start1StartedAt : '' , stop1StoppedAt : '' , pause1Id : '' , start2StartedAt : '' , stop2StoppedAt : '' , pause2Id : '' , plannedHours : '' , flexBalanceToDate : 'swap_vert88.36' , flexToDate : '94.70' , flexIncludingToday : '88.36' , nettoHours : '0.00' , todaysFlex : '-6.33' , paidOutFlex : 0 , calculatedHours : 6.333333333333333 } ,
122+ { date : lastWeekDates [ 6 ] , start1StartedAt : '06:00' , stop1StoppedAt : '14:00' , pause1Id : '00:30' , start2StartedAt : '' , stop2StoppedAt : '' , pause2Id : '' , plannedHours : '8:00' , flexBalanceToDate : 'swap_vert88.36' , flexToDate : '88.36' , flexIncludingToday : '88.36' , nettoHours : '7.50' , todaysFlex : '0.00' , paidOutFlex : 0 , calculatedHours : '7.5' }
123123] ;
124124
125125describe ( 'Dashboard edit values' , ( ) => {
@@ -144,7 +144,7 @@ describe('Dashboard edit values', () => {
144144 cy . get ( cellId ) . click ( ) ;
145145 cy . get ( '#planHours' ) . should ( 'be.visible' ) ;
146146
147- if ( secondUpdateActualTexts [ i ] . start1StartedAt !== '' ) {
147+ if ( secondUpdateActualTexts [ i ] . start1StartedAt !== '' && secondUpdateActualTexts [ i ] . start1StartedAt !== '00:00' ) {
148148 cy . get ( `#start1StartedAt` ) . click ( ) ;
149149 // eslint-disable-next-line max-len
150150 let degrees0 = 360 / 12 * parseInt ( secondUpdateActualTexts [ i ] . start1StartedAt . split ( ':' ) [ 0 ] ) ;
@@ -165,7 +165,7 @@ describe('Dashboard edit values', () => {
165165 }
166166 cy . get ( '#start1StartedAt' ) . should ( 'have.value' , secondUpdateActualTexts [ i ] . start1StartedAt ) ;
167167
168- if ( secondUpdateActualTexts [ i ] . stop1StoppedAt !== '' ) {
168+ if ( secondUpdateActualTexts [ i ] . stop1StoppedAt !== '' && secondUpdateActualTexts [ i ] . stop1StoppedAt !== '00:00' ) {
169169 cy . get ( `#stop1StoppedAt` ) . click ( ) ;
170170 // eslint-disable-next-line max-len
171171 let degrees1 = 360 / 12 * parseInt ( secondUpdateActualTexts [ i ] . stop1StoppedAt . split ( ':' ) [ 0 ] ) ;
@@ -189,7 +189,7 @@ describe('Dashboard edit values', () => {
189189 }
190190 cy . get ( '#stop1StoppedAt' ) . should ( 'have.value' , secondUpdateActualTexts [ i ] . stop1StoppedAt ) ;
191191
192- if ( secondUpdateActualTexts [ i ] . pause1Id !== '' || secondUpdateActualTexts [ i ] . pause1Id !== '00:00' ) {
192+ if ( secondUpdateActualTexts [ i ] . pause1Id !== '' && secondUpdateActualTexts [ i ] . pause1Id !== '00:00' ) {
193193 cy . get ( `#pause1Id` ) . click ( ) ;
194194 // eslint-disable-next-line max-len
195195 let degrees2 = 360 / 12 * parseInt ( secondUpdateActualTexts [ i ] . pause1Id . split ( ':' ) [ 0 ] ) ;
@@ -212,10 +212,10 @@ describe('Dashboard edit values', () => {
212212 cy . get ( '.timepicker-button span' ) . contains ( 'Ok' ) . click ( ) ;
213213 cy . get ( '#pause1Id' ) . should ( 'have.value' , secondUpdateActualTexts [ i ] . pause1Id ) ;
214214 } else {
215- cy . get ( '#pause1Id' ) . should ( 'have.value' , '00:00 ' ) ;
215+ cy . get ( '#pause1Id' ) . should ( 'have.value' , '' ) ;
216216 }
217217
218- if ( secondUpdateActualTexts [ i ] . start2StartedAt !== '' || secondUpdateActualTexts [ i ] . start2StartedAt !== '00:00' ) {
218+ if ( secondUpdateActualTexts [ i ] . start2StartedAt !== '' && secondUpdateActualTexts [ i ] . start2StartedAt !== '00:00' ) {
219219 cy . get ( `#start2StartedAt` ) . click ( ) ;
220220 // eslint-disable-next-line max-len
221221 let degrees3 = 360 / 12 * parseInt ( secondUpdateActualTexts [ i ] . start2StartedAt . split ( ':' ) [ 0 ] ) ;
@@ -239,7 +239,7 @@ describe('Dashboard edit values', () => {
239239 }
240240 cy . get ( '#start2StartedAt' ) . should ( 'have.value' , secondUpdateActualTexts [ i ] . start2StartedAt ) ;
241241
242- if ( secondUpdateActualTexts [ i ] . stop2StoppedAt !== '' || secondUpdateActualTexts [ i ] . stop2StoppedAt !== '00:00' ) {
242+ if ( secondUpdateActualTexts [ i ] . stop2StoppedAt !== '' && secondUpdateActualTexts [ i ] . stop2StoppedAt !== '00:00' ) {
243243 cy . get ( `#stop2StoppedAt` ) . click ( ) ;
244244 // eslint-disable-next-line max-len
245245 let degrees4 = 360 / 12 * parseInt ( secondUpdateActualTexts [ i ] . stop2StoppedAt . split ( ':' ) [ 0 ] ) ;
@@ -263,7 +263,7 @@ describe('Dashboard edit values', () => {
263263 }
264264 cy . get ( '#stop2StoppedAt' ) . should ( 'have.value' , secondUpdateActualTexts [ i ] . stop2StoppedAt ) ;
265265
266- if ( secondUpdateActualTexts [ i ] . pause2Id !== '' || secondUpdateActualTexts [ i ] . pause2Id !== '00:00' ) {
266+ if ( secondUpdateActualTexts [ i ] . pause2Id !== '' && secondUpdateActualTexts [ i ] . pause2Id !== '00:00' ) {
267267 cy . get ( `#pause2Id` ) . click ( ) ;
268268 // eslint-disable-next-line max-len
269269 let degrees5 = 360 / 12 * parseInt ( secondUpdateActualTexts [ i ] . pause2Id . split ( ':' ) [ 0 ] ) ;
0 commit comments