@@ -1331,7 +1331,7 @@ describe('Pivot pipes #pivotGrid', () => {
13311331 let rowPipeResult = rowPipe . transform ( data , pivotConfig , expansionStates ) ;
13321332 let columnPipeResult = columnPipe . transform ( rowPipeResult , pivotConfig , new Map < any , boolean > ( ) ) ;
13331333 let rowStatePipeResult = rowStatePipe . transform ( columnPipeResult , pivotConfig , expansionStates , true ) ;
1334- expect ( rowStatePipeResult . length ) . toBe ( 77 ) ;
1334+ expect ( rowStatePipeResult . length ) . toBe ( 84 ) ;
13351335 const prod_country_date_seller_discontinued = PivotGridFunctions . getDimensionData ( rowStatePipeResult , pivotConfig . rows ) ;
13361336 const allPeriods_allProducts_records = prod_country_date_seller_discontinued . filter ( x => x [ 'AllPeriods' ] === 'All Periods' &&
13371337 x [ 'AllProduct' ] === 'All Products' ) ;
@@ -1354,8 +1354,58 @@ describe('Pivot pipes #pivotGrid', () => {
13541354 ]
13551355 ) ;
13561356
1357- // TODO - check the rest of the 'All Periods' fields here once issue: https://github.com/IgniteUI/igniteui-angular/issues/10680 is resolved.
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+ ] ) ;
1383+
1384+ // 2021
1385+ const year_2021_records = prod_country_date_seller_discontinued . filter ( x => x [ 'Years' ] === '2021' ) ;
1386+ expect ( year_2021_records ) . toEqual ( [
1387+ { Years : '2021' , AllProduct : 'All Products' , AllCountries : 'All Countries' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1388+ { Years : '2021' , AllProduct : 'All Products' , AllCountries : 'All Countries' , SellerName : 'David' , Discontinued : 'false' } ,
1389+ { Years : '2021' , AllProduct : 'All Products' , AllCountries : 'All Countries' , SellerName : 'John' , Discontinued : 'false' } ,
1390+ { Years : '2021' , AllProduct : 'All Products' , Country : 'Bulgaria' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1391+ { Years : '2021' , AllProduct : 'All Products' , Country : 'USA' , SellerName : 'David' , Discontinued : 'false' } ,
1392+ { Years : '2021' , AllProduct : 'All Products' , Country : 'USA' , SellerName : 'John' , Discontinued : 'false' } ,
1393+ { Years : '2021' , ProductCategory : 'Clothing' , AllCountries : 'All Countries' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1394+ { Years : '2021' , ProductCategory : 'Clothing' , Country : 'Bulgaria' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1395+ { Years : '2021' , ProductCategory : 'Accessories' , AllCountries : 'All Countries' , SellerName : 'David' , Discontinued : 'false' } ,
1396+ { Years : '2021' , ProductCategory : 'Accessories' , Country : 'USA' , SellerName : 'David' , Discontinued : 'false' } ,
1397+ { Years : '2021' , ProductCategory : 'Components' , AllCountries : 'All Countries' , SellerName : 'John' , Discontinued : 'false' } ,
1398+ { Years : '2021' , ProductCategory : 'Components' , Country : 'USA' , SellerName : 'John' , Discontinued : 'false' } ,
1399+ ] ) ;
13581400
1401+ // 01/01/2021
1402+ const date_2021_clothing_records = prod_country_date_seller_discontinued . filter ( x => x [ 'Date' ] === '01/01/2021' ) ;
1403+ expect ( date_2021_clothing_records ) . toEqual ( [
1404+ { Date : '01/01/2021' , AllProduct : 'All Products' , AllCountries : 'All Countries' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1405+ { Date : '01/01/2021' , AllProduct : 'All Products' , Country : 'Bulgaria' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1406+ { Date : '01/01/2021' , ProductCategory : 'Clothing' , AllCountries : 'All Countries' , SellerName : 'Stanley' , Discontinued : 'false' } ,
1407+ { Date : '01/01/2021' , ProductCategory : 'Clothing' , Country : 'Bulgaria' , SellerName : 'Stanley' , Discontinued : 'false' }
1408+ ] ) ;
13591409 // Discontinued, Date, Product, Country, Seller
13601410 pivotConfig . rows = [
13611411 dims [ 4 ] ,
@@ -1368,12 +1418,12 @@ describe('Pivot pipes #pivotGrid', () => {
13681418 rowPipeResult = rowPipe . transform ( data , pivotConfig , expansionStates ) ;
13691419 columnPipeResult = columnPipe . transform ( rowPipeResult , pivotConfig , new Map < any , boolean > ( ) ) ;
13701420 rowStatePipeResult = rowStatePipe . transform ( columnPipeResult , pivotConfig , expansionStates , true ) ;
1371- expect ( rowStatePipeResult . length ) . toBe ( 77 ) ;
1421+ expect ( rowStatePipeResult . length ) . toBe ( 84 ) ;
13721422 const discontinued_prod_country_date_seller = PivotGridFunctions . getDimensionData ( rowStatePipeResult , pivotConfig . rows ) ;
13731423 const ongoing_records = discontinued_prod_country_date_seller . filter ( x => x [ 'Discontinued' ] === 'false' ) ;
13741424 const discontinued_records = discontinued_prod_country_date_seller . filter ( x => x [ 'Discontinued' ] === 'true' ) ;
1375- expect ( discontinued_records . length ) . toBe ( 33 ) ;
1376- expect ( ongoing_records . length ) . toBe ( 44 ) ;
1425+ expect ( discontinued_records . length ) . toBe ( 36 ) ;
1426+ expect ( ongoing_records . length ) . toBe ( 48 ) ;
13771427 const ongoing_allPeriods = ongoing_records . filter ( x => x [ 'AllPeriods' ] === 'All Periods' ) ;
13781428 expect ( ongoing_allPeriods ) . toEqual ( [
13791429 { Discontinued : 'false' , AllPeriods : 'All Periods' , AllProduct : 'All Products' , AllCountries : 'All Countries' , SellerName : 'Stanley' } ,
@@ -1452,7 +1502,7 @@ describe('Pivot pipes #pivotGrid', () => {
14521502 rowPipeResult = rowPipe . transform ( data , pivotConfig , expansionStates ) ;
14531503 columnPipeResult = columnPipe . transform ( rowPipeResult , pivotConfig , new Map < any , boolean > ( ) ) ;
14541504 rowStatePipeResult = rowStatePipe . transform ( columnPipeResult , pivotConfig , expansionStates , true ) ;
1455- expect ( rowStatePipeResult . length ) . toBe ( 73 ) ;
1505+ expect ( rowStatePipeResult . length ) . toBe ( 84 ) ;
14561506 const date_prod_disc_seller = PivotGridFunctions . getDimensionData ( rowStatePipeResult , pivotConfig . rows ) ;
14571507
14581508 const date_allPeriods_allProducts_records = date_prod_disc_seller . filter ( x => x [ 'AllPeriods' ] === 'All Periods' && x [ 'AllProduct' ] === 'All Products' ) ;
0 commit comments