@@ -155,13 +155,13 @@ describe('Reports Page', () => {
155
155
} ) ;
156
156
} ) ;
157
157
158
- it ( 'The data should be displayed as a multiple of hour when column is equal to 3 ' , ( ) => {
159
- const column = 3 ;
158
+ it ( 'The data should be displayed as a multiple of hour when column is equal to 4 ' , ( ) => {
159
+ const column = 4 ;
160
160
expect ( component . bodyExportOptions ( durationTime , row , column , node ) ) . toMatch ( decimalValidator ) ;
161
161
} ) ;
162
162
163
- it ( 'The data should not be displayed as a multiple of hour when column is different of 3 ' , ( ) => {
164
- const column = 4 ;
163
+ it ( 'The data should not be displayed as a multiple of hour when column is different of 4 ' , ( ) => {
164
+ const column = 5 ;
165
165
expect ( component . bodyExportOptions ( durationTime , row , column , node ) ) . toBe ( durationTime . toString ( ) ) ;
166
166
} ) ;
167
167
@@ -217,6 +217,54 @@ describe('Reports Page', () => {
217
217
expect ( { hours, minutes, seconds} ) . toEqual ( { hours :0 , minutes :0 , seconds :0 } ) ;
218
218
} ) ;
219
219
220
+ it ( 'should export data with the correct format' , ( ) => {
221
+ const data = [
222
+ '<mat-checkbox _ngcontent-tst-c180="" class="mat-checkbox mat-accent" id="mat-checkbox-27"><label class="mat-checkbox-layout" for="mat-checkbox-27-input"><span class="mat-checkbox-inner-container mat-checkbox-inner-container-no-side-margin"><input type="checkbox" class="mat-checkbox-input cdk-visually-hidden" id="mat-checkbox-27-input" tabindex="0" aria-checked="false"><span matripple="" class="mat-ripple mat-checkbox-ripple mat-focus-indicator" ng-reflect-trigger="[object HTMLLabelElement]" ng-reflect-disabled="false" ng-reflect-radius="20" ng-reflect-centered="true" ng-reflect-animation="[object Object]"><span class="mat-ripple-element mat-checkbox-persistent-ripple"></span></span><span class="mat-checkbox-frame"></span><span class="mat-checkbox-background"><svg version="1.1" focusable="false" viewBox="0 0 24 24" xml:space="preserve" class="mat-checkbox-checkmark"><path fill="none" stroke="white" d="M4.1,12.7 9,17.6 20.3,6.3" class="mat-checkbox-checkmark-path"></path></svg><span class="mat-checkbox-mixedmark"></span></span></span><span class="mat-checkbox-label"><span style="display: none;"> </span></span></label></mat-checkbox>' ,
223
+ '19' ,
224
+
225
+ '07/01/2022' ,
226
+ '09:00' ,
227
+ '09:00' ,
228
+ '18:00' ,
229
+ 'Project_Name' ,
230
+ '3' ,
231
+ 'Customer_Name' ,
232
+ '3' ,
233
+ 'Activity_Name' ,
234
+ `<a _ngcontent-tst-c180="" class="is-url ng-star-inserted"> https://ioetec.atlassian.net/browse/CB-115 </a><!--ng-container--><!--bindings={
235
+ "ng-reflect-ng-if": "true"
236
+ }-->` ,
237
+ '' ,
238
+ `<div _ngcontent-tst-c180="" class="badge bg-secondary text-wrap ng-star-inserted"> git </div><!--bindings={
239
+ "ng-reflect-ng-for-of": "git"
240
+ }--><!--ng-container--><!--bindings={
241
+ "ng-reflect-ng-if": "true"
242
+ }-->`
243
+ ] ;
244
+ const dataFormat = [
245
+ '<span matripple="" class="mat-ripple mat-checkbox-ripple mat-focus-indicator" ng-reflect-trigger="[object HTMLLabelElement]" ng-reflect-disabled="false" ng-reflect-radius="20" ng-reflect-centered="true" ng-reflect-animation="[object Object]"> ' ,
246
+ '19' ,
247
+
248
+ '07/01/2022' ,
249
+ '9.00' ,
250
+ '09:00' ,
251
+ '18:00' ,
252
+ 'Project_Name' ,
253
+ '3' ,
254
+ 'Customer_Name' ,
255
+ '3' ,
256
+ 'Activity_Name' ,
257
+ ' https://ioetec.atlassian.net/browse/CB-115 ' ,
258
+ '' ,
259
+ ' git '
260
+ ] ;
261
+
262
+ data . forEach ( ( value : any , index ) => {
263
+ const formatValue = component . bodyExportOptions ( value , row , index , node ) ;
264
+ expect ( formatValue ) . toEqual ( dataFormat [ index ] ) ;
265
+ } ) ;
266
+ } ) ;
267
+
220
268
afterEach ( ( ) => {
221
269
fixture . destroy ( ) ;
222
270
} ) ;
0 commit comments