@@ -11,7 +11,6 @@ import pivotGridUtils, { setFieldProperty } from '__internal/grids/pivot_grid/m_
1111
1212import executeAsyncMock from '../../helpers/executeAsyncMock.js' ;
1313import '../../content/orders.js' ;
14- import PivotGridTestSettings from '../../helpers/pivotGridTestSettings.js' ;
1514
1615function createDataSource ( options ) {
1716 const dataSource = new PivotGridDataSource ( options ) ;
@@ -4108,97 +4107,6 @@ QUnit.module('dxPivotGrid dataSource with Store', {
41084107 } ) ;
41094108 } ) ;
41104109
4111- if ( window . INTRANET ) {
4112-
4113- QUnit . test ( 'XMLA store integration' , function ( assert ) {
4114- const done = assert . async ( ) ;
4115- const dataSource = createDataSource ( {
4116- descriptions : {
4117- columns : [ { dataField : '[Product].[Category]' , allMember : '[All Products]' } ] ,
4118- rows : [ { dataField : '[Ship Date].[Calendar Year]' , allMember : '[All Periods]' } ] ,
4119- values : [ { dataField : '[Measures].[Customer Count]' , caption : 'Count' } ]
4120- } ,
4121- store : {
4122- type : 'xmla' ,
4123- url : PivotGridTestSettings . XMLA_STORE_URL ,
4124- catalog : 'Adventure Works DW Standard Edition' ,
4125- cube : 'Adventure Works'
4126- }
4127- } ) ;
4128-
4129- dataSource . on ( 'changed' , function ( ) {
4130-
4131- assert . deepEqual ( prepareLoadedData ( dataSource . getData ( ) . columns ) , [
4132- { key : '[Product].[Category].&[4]' , value : 'Accessories' , index : 1 } ,
4133- { key : '[Product].[Category].&[1]' , value : 'Bikes' , index : 2 } ,
4134- { key : '[Product].[Category].&[3]' , value : 'Clothing' , index : 3 }
4135- ] ) ;
4136- assert . deepEqual ( prepareLoadedData ( dataSource . getData ( ) . rows ) , [
4137- { key : '[Ship Date].[Calendar Year].&[2001]' , value : 2001 , index : 1 } ,
4138- { key : '[Ship Date].[Calendar Year].&[2002]' , value : 2002 , index : 2 } ,
4139- { key : '[Ship Date].[Calendar Year].&[2003]' , value : 2003 , index : 3 } ,
4140- { key : '[Ship Date].[Calendar Year].&[2004]' , value : 2004 , index : 4 }
4141- ] ) ;
4142- assert . strictEqual ( dataSource . getData ( ) . grandTotalColumnIndex , 0 ) ;
4143- assert . strictEqual ( dataSource . getData ( ) . grandTotalRowIndex , 0 ) ;
4144- assert . deepEqual ( dataSource . getData ( ) . values , [
4145- [ [ 18484 ] , [ 15114 ] , [ 9132 ] , [ 6852 ] ] ,
4146- [ [ 962 ] , [ null ] , [ 962 ] , [ null ] ] ,
4147- [ [ 2665 ] , [ null ] , [ 2665 ] , [ null ] ] ,
4148- [ [ 9002 ] , [ 6470 ] , [ 4756 ] , [ 2717 ] ] ,
4149- [ [ 11753 ] , [ 9745 ] , [ 5646 ] , [ 4340 ] ]
4150- ] ) ;
4151- done ( ) ;
4152- } ) ;
4153- } ) ;
4154-
4155- QUnit . test ( 'XMLA store. Sorting data' , function ( assert ) {
4156- const done = assert . async ( ) ;
4157- const dataSource = createDataSource ( {
4158- descriptions : {
4159- columns : [ { dataField : '[Product].[Category]' } ] ,
4160- rows : [ { dataField : '[Ship Date].[Month Of Year]' } ] ,
4161- values : [ { dataField : '[Measures].[Customer Count]' , caption : 'Count' } ]
4162- } ,
4163- store : {
4164- type : 'xmla' ,
4165- url : PivotGridTestSettings . XMLA_STORE_URL ,
4166- catalog : 'Adventure Works DW Standard Edition' ,
4167- cube : 'Adventure Works'
4168- }
4169- } ) ;
4170-
4171- dataSource . on ( 'changed' , function ( ) {
4172- assert . deepEqual ( prepareLoadedData ( dataSource . getData ( ) . columns ) , [
4173- { key : '[Product].[Category].&[4]' , value : 'Accessories' , index : 1 } ,
4174- { key : '[Product].[Category].&[1]' , value : 'Bikes' , index : 2 } ,
4175- { key : '[Product].[Category].&[3]' , value : 'Clothing' , index : 3 }
4176- ] ) ;
4177-
4178- assert . deepEqual ( dataSource . getData ( ) . rows . length , 12 , 'month count' ) ;
4179- assert . deepEqual ( dataSource . getData ( ) . rows [ 0 ] , {
4180- index : 1 ,
4181- key : '[Ship Date].[Month of Year].&[1]' ,
4182- text : 'January' ,
4183- value : 1
4184- } , 'month 1' ) ;
4185- assert . deepEqual ( dataSource . getData ( ) . rows [ 11 ] , {
4186- index : 12 ,
4187- key : '[Ship Date].[Month of Year].&[12]' ,
4188- text : 'December' ,
4189- value : 12
4190- } , 'month 12' ) ;
4191-
4192- assert . strictEqual ( dataSource . getData ( ) . grandTotalColumnIndex , 0 ) ;
4193- assert . strictEqual ( dataSource . getData ( ) . grandTotalRowIndex , 0 ) ;
4194- assert . deepEqual ( dataSource . getData ( ) . values [ 0 ] , [ [ 18484 ] , [ 15114 ] , [ 9132 ] , [ 6852 ] ] ) ;
4195- assert . deepEqual ( dataSource . getData ( ) . values [ 1 ] , [ [ 2224 ] , [ 1485 ] , [ 1220 ] , [ 649 ] ] ) ;
4196- done ( ) ;
4197- } ) ;
4198- } ) ;
4199- }
4200-
4201-
42024110 QUnit . test ( 'Do not perform summary calculation if dataSource is empty' , function ( assert ) {
42034111 const def = $ . Deferred ( ) ;
42044112
0 commit comments