Skip to content

Commit e5d6203

Browse files
authored
PivotGrid - Unskip and mock XMLA store tests (#32711)
1 parent 3124c78 commit e5d6203

8 files changed

Lines changed: 1732 additions & 4039 deletions

File tree

packages/devextreme/testing/helpers/pivotGridTestSettings.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/devextreme/testing/runner/Controllers/MainController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ void AssignBaseRunProps(BaseRunViewModel m)
281281
var q = Request.Query;
282282

283283
m.IsContinuousIntegration = _runFlags.IsContinuousIntegration;
284-
m.IsIntranet = _runFlags.IsIntranet;
285284
m.NoGlobals = q.ContainsKey("noglobals");
286285
m.NoTimers = q.ContainsKey("notimers");
287286
m.NoTryCatch = q.ContainsKey("notrycatch");

packages/devextreme/testing/runner/Models/BaseRunViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ public abstract class BaseRunViewModel
1010
public bool NoCsp { get; set; }
1111
public bool WorkerInWindow { get; set; }
1212
public bool IsContinuousIntegration { get; set; }
13-
public bool IsIntranet { get; set; }
1413
public int? MaxWorkers { get; set; }
1514
}
1615
}

packages/devextreme/testing/runner/Program.cs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ public static int Main(string[] argv)
6060
services.AddSingleton(new RunFlags
6161
{
6262
SingleRun = argv.Contains("--single-run"),
63-
IsContinuousIntegration = IsContinuousIntegration(),
64-
IsIntranet = IsIntranet()
63+
IsContinuousIntegration = IsContinuousIntegration()
6564
});
6665
})
6766
.Configure(app => app
@@ -124,17 +123,5 @@ static bool IsContinuousIntegration()
124123
return !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("CCNetWorkingDirectory"))
125124
|| !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("DEVEXTREME_TEST_CI"));
126125
}
127-
128-
static bool IsIntranet()
129-
{
130-
try
131-
{
132-
return Dns.GetHostAddresses("corp.devexpress.com").Length > 0;
133-
}
134-
catch
135-
{
136-
return false;
137-
}
138-
}
139126
}
140127
}

packages/devextreme/testing/runner/Tools/RunFlags.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ public class RunFlags
44
{
55
public bool SingleRun { get; set; }
66
public bool IsContinuousIntegration { get; set; }
7-
public bool IsIntranet { get; set; }
87
}
98
}

packages/devextreme/testing/runner/Views/Main/RunSuite.cshtml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
<script nonce="M5H5tE">
6262
window.ROOT_URL = "@Url.Content("~/")";
6363
window.farmMode = @Html.Raw(Json.Serialize(Model.IsContinuousIntegration));
64-
window.INTRANET = @Html.Raw(Json.Serialize(Model.IsIntranet));
6564
6665
QUnit.config.autostart = false;
6766
QUnit.config.failOnZeroTests = false;

packages/devextreme/testing/tests/DevExpress.ui.widgets.pivotGrid/dataSource_bundled.tests.js

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import pivotGridUtils, { setFieldProperty } from '__internal/grids/pivot_grid/m_
1111

1212
import executeAsyncMock from '../../helpers/executeAsyncMock.js';
1313
import '../../content/orders.js';
14-
import PivotGridTestSettings from '../../helpers/pivotGridTestSettings.js';
1514

1615
function 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

Comments
 (0)