@@ -1354,8 +1354,32 @@ describe('Pivot pipes #pivotGrid', () => {
1354
1354
]
1355
1355
) ;
1356
1356
1357
- // TODO - check the rest of the 'All Periods' fields here once issue: https://github.com/IgniteUI/igniteui-angular/issues/10680 is resolved.
1358
-
1357
+ const allPeriods_clothing_records = prod_country_date_seller_discontinued . filter ( x => x [ 'AllPeriods' ] === 'All Periods' && x [ 'ProductCategory' ] === 'Clothing' ) ;
1358
+ expect ( allPeriods_clothing_records ) . toEqual ( [
1359
+ { AllPeriods : 'All Periods' , ProductCategory : 'Clothing' , AllCountries : 'All Countries' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1360
+ { AllPeriods : 'All Periods' , ProductCategory : 'Clothing' , AllCountries : 'All Countries' , SellerName : 'Elisa' , Discontinued : 'true' } ,
1361
+ { AllPeriods : 'All Periods' , ProductCategory : 'Clothing' , AllCountries : 'All Countries' , SellerName : 'Larry' , Discontinued : 'true' } ,
1362
+ { AllPeriods : 'All Periods' , ProductCategory : 'Clothing' , AllCountries : 'All Countries' , SellerName : 'Walter' , Discontinued : 'false' } ,
1363
+ { AllPeriods : 'All Periods' , ProductCategory : 'Clothing' , Country : 'Bulgaria' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1364
+ { AllPeriods : 'All Periods' , ProductCategory : 'Clothing' , Country : 'Bulgaria' , SellerName : 'Walter' , Discontinued : 'false' } ,
1365
+ { AllPeriods : 'All Periods' , ProductCategory : 'Clothing' , Country : 'USA' , SellerName : 'Elisa' , Discontinued : 'true' } ,
1366
+ { AllPeriods : 'All Periods' , ProductCategory : 'Clothing' , Country : 'Uruguay' , SellerName : 'Larry' , Discontinued : 'true' }
1367
+ ] ) ;
1368
+ const allPeriods_accessories_records = prod_country_date_seller_discontinued . filter ( x => x [ 'AllPeriods' ] === 'All Periods' && x [ 'ProductCategory' ] === 'Accessories' ) ;
1369
+ expect ( allPeriods_accessories_records ) . toEqual ( [
1370
+ { AllPeriods : 'All Periods' , ProductCategory : 'Accessories' , AllCountries : 'All Countries' , SellerName : 'David' , Discontinued : 'false' } ,
1371
+ { AllPeriods : 'All Periods' , ProductCategory : 'Accessories' , Country : 'USA' , SellerName : 'David' , Discontinued : 'false' }
1372
+ ] ) ;
1373
+ const allPeriods_components_records = prod_country_date_seller_discontinued . filter ( x => x [ 'AllPeriods' ] === 'All Periods' && x [ 'ProductCategory' ] === 'Components' ) ;
1374
+ expect ( allPeriods_components_records ) . toEqual ( [
1375
+ { AllPeriods : 'All Periods' , ProductCategory : 'Components' , AllCountries : 'All Countries' , SellerName : 'John' , Discontinued : 'false' } ,
1376
+ { AllPeriods : 'All Periods' , ProductCategory : 'Components' , Country : 'USA' , SellerName : 'John' , Discontinued : 'false' }
1377
+ ] ) ;
1378
+ const allPeriods_bikes_records = prod_country_date_seller_discontinued . filter ( x => x [ 'AllPeriods' ] === 'All Periods' && x [ 'ProductCategory' ] === 'Bikes' ) ;
1379
+ expect ( allPeriods_bikes_records ) . toEqual ( [
1380
+ { AllPeriods : 'All Periods' , ProductCategory : 'Bikes' , AllCountries : 'All Countries' , SellerName : 'Lydia' , Discontinued : 'true' } ,
1381
+ { AllPeriods : 'All Periods' , ProductCategory : 'Bikes' , Country : 'Uruguay' , SellerName : 'Lydia' , Discontinued : 'true' }
1382
+ ] )
1359
1383
// Discontinued, Date, Product, Country, Seller
1360
1384
pivotConfig . rows = [
1361
1385
dims [ 4 ] ,
@@ -1452,7 +1476,7 @@ describe('Pivot pipes #pivotGrid', () => {
1452
1476
rowPipeResult = rowPipe . transform ( data , pivotConfig , expansionStates ) ;
1453
1477
columnPipeResult = columnPipe . transform ( rowPipeResult , pivotConfig , new Map < any , boolean > ( ) ) ;
1454
1478
rowStatePipeResult = rowStatePipe . transform ( columnPipeResult , pivotConfig , expansionStates , true ) ;
1455
- expect ( rowStatePipeResult . length ) . toBe ( 73 ) ;
1479
+ expect ( rowStatePipeResult . length ) . toBe ( 75 ) ;
1456
1480
const date_prod_disc_seller = PivotGridFunctions . getDimensionData ( rowStatePipeResult , pivotConfig . rows ) ;
1457
1481
1458
1482
const date_allPeriods_allProducts_records = date_prod_disc_seller . filter ( x => x [ 'AllPeriods' ] === 'All Periods' && x [ 'AllProduct' ] === 'All Products' ) ;
0 commit comments