Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/demos/Demos/PivotGrid/Filtering/test-code.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
testUtils.postponeUntil(() => testUtils.findElements('td, span').some((x) => (x.innerHTML || '').indexOf('London') !== -1 || (x.innerHTML || '').indexOf('Accessories') !== -1), 200, 20000).then(() => testUtils
.postponeUntilFound('.dx-pivotgrid').then(() => testUtils.importAnd(() => 'devextreme/ui/pivot_grid', () => DevExpress.ui.dxPivotGrid, (dxPivotGrid) => {
testUtils.findElements('.dx-pivotgrid:first-of-type').forEach((x) => {
dxPivotGrid.getInstance(x).resetOption('height');
});
})));
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
testUtils.postponeUntil(() => testUtils.findElements('td, span').some((x) => (x.innerHTML || '').indexOf('Accessories') !== -1), 200, 20000).then(() => testUtils
.postponeUntilFound('.dx-pivotgrid'));
6 changes: 6 additions & 0 deletions apps/demos/Demos/PivotGrid/OLAPDataSource/test-code.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
testUtils.postponeUntil(() => testUtils.findElements('td, span').some((x) => (x.innerHTML || '').indexOf('Accessories') !== -1), 200, 20000).then(() => testUtils
.postponeUntilFound('.dx-pivotgrid').then(() => testUtils.importAnd(() => 'devextreme/ui/pivot_grid', () => DevExpress.ui.dxPivotGrid, (dxPivotGrid) => {
testUtils.findElements('.dx-pivotgrid:first-of-type').forEach((x) => {
dxPivotGrid.getInstance(x).resetOption('height');
});
})));
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
testUtils.postponeUntil(() => testUtils.findElements('td, span').some((x) => (x.innerHTML || '').indexOf('Aaron') !== -1), 200, 20000).then(() => testUtils
.postponeUntilFound('.dx-pivotgrid').then(() => testUtils.importAnd(() => 'devextreme/ui/pivot_grid', () => DevExpress.ui.dxPivotGrid, (dxPivotGrid) => {
testUtils.findElements('.dx-pivotgrid:first-of-type').forEach((x) => {
dxPivotGrid.getInstance(x).resetOption('height');
});
})));
62 changes: 62 additions & 0 deletions apps/demos/Demos/Scheduler/SignalRService/client-script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Stub the Scheduler SignalR hub WebSocket so connection.start() resolves
// without reaching js.devexpress.com. Appointments come from the mocked
// /api/SchedulerSignalR load; hub events are not needed for screenshots.

(() => {
const RECORD_SEPARATOR = String.fromCharCode(0x1e);
const NativeWebSocket = window.WebSocket;
const HANDSHAKE_RESPONSE = {};

const isSchedulerHub = (url) => /schedulerSignalRHub/i.test(String(url));

class SchedulerHubSocket {
constructor(url) {
this.url = url;
this.readyState = NativeWebSocket.CONNECTING;

setTimeout(() => {
this.readyState = NativeWebSocket.OPEN;
if (this.onopen) {
this.onopen({ target: this });
}
});
}

send(data) {
String(data)
.split(RECORD_SEPARATOR)
.filter((frame) => frame.length)
.forEach((frame) => this.reply(JSON.parse(frame)));
}

reply(message) {
if (message.protocol) {
this.dispatch(HANDSHAKE_RESPONSE);
}
}

dispatch(message) {
if (this.onmessage) {
this.onmessage({ data: JSON.stringify(message) + RECORD_SEPARATOR });
}
}

close() {
this.readyState = NativeWebSocket.CLOSED;
if (this.onclose) {
this.onclose({ wasClean: true, code: 1000, reason: '' });
}
}
}

window.WebSocket = function WebSocket(url, protocols) {
return isSchedulerHub(url)
? new SchedulerHubSocket(url)
: new NativeWebSocket(url, protocols);
};

window.WebSocket.CONNECTING = NativeWebSocket.CONNECTING;
window.WebSocket.OPEN = NativeWebSocket.OPEN;
window.WebSocket.CLOSING = NativeWebSocket.CLOSING;
window.WebSocket.CLOSED = NativeWebSocket.CLOSED;
})();
9 changes: 9 additions & 0 deletions apps/demos/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export default [
'callstack',
'Deprecations',
'ignoreDeprecations',
'reseller',
];

return spellcheckRule;
Expand Down Expand Up @@ -470,6 +471,14 @@ export default [
},
},

{
files: ['testing/apiMocks/xmla/**/*.ts'],
rules: {
'@stylistic/quotes': 'off',
'spellcheck/spell-checker': 'off',
},
},

{
files: ['**/test-code.js', '**/client-script.js'],
languageOptions: {
Expand Down
133 changes: 133 additions & 0 deletions apps/demos/testing/apiMocks/fixtures/googleCalendarEvents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"kind": "calendar#events",
"etag": "\"p339ofau0hmqp80o\"",
"summary": "Shared",
"description": "",
"updated": "2026-05-13T01:24:41.203Z",
"timeZone": "Europe/London",
"accessRole": "reader",
"defaultReminders": [],
"nextSyncToken": "CNOHq8CNtZQDEAAYASCF2fHIAyiF2fHIAw==",
"items": [
{
"kind": "calendar#event",
"etag": "\"2995719729570000\"",
"id": "ufltvtp2s1es4i2l4jt9bncf9c",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=dWZsdHZ0cDJzMWVzNGkybDRqdDlibmNmOWMgZjdqbmV0bTIyZHNqYzNucGMybHUzYnV2dTRAZw",
"created": "2015-05-27T10:27:10.000Z",
"updated": "2017-06-19T08:11:04.785Z",
"summary": "Approve Personal Computer Upgrade Plan",
"creator": {
"email": "user4652@gmail.com",
"displayName": "Donald Murphy"
},
"organizer": {
"email": "f7jnetm22dsjc3npc2lu3buvu4@group.calendar.google.com",
"displayName": "Shared",
"self": true
},
"start": {
"dateTime": "2017-05-23T18:00:00+01:00",
"timeZone": "UTC"
},
"end": {
"dateTime": "2017-05-23T20:00:00+01:00",
"timeZone": "UTC"
},
"iCalUID": "ufltvtp2s1es4i2l4jt9bncf9c@google.com",
"sequence": 9,
"eventType": "default"
},
{
"kind": "calendar#event",
"etag": "\"2995719775516000\"",
"id": "pjo97p26heu0i73mapivkhrheg",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=cGpvOTdwMjZoZXUwaTczbWFwaXZraHJoZWcgZjdqbmV0bTIyZHNqYzNucGMybHUzYnV2dTRAZw",
"created": "2015-05-27T09:31:14.000Z",
"updated": "2017-06-19T08:11:27.758Z",
"summary": "Upgrade Server Hardware",
"creator": {
"email": "user4652@gmail.com",
"displayName": "Donald Murphy"
},
"organizer": {
"email": "f7jnetm22dsjc3npc2lu3buvu4@group.calendar.google.com",
"displayName": "Shared",
"self": true
},
"start": {
"dateTime": "2017-05-25T16:30:00+01:00",
"timeZone": "UTC"
},
"end": {
"dateTime": "2017-05-25T20:30:00+01:00",
"timeZone": "UTC"
},
"iCalUID": "pjo97p26heu0i73mapivkhrheg@google.com",
"sequence": 15,
"eventType": "default"
},
{
"kind": "calendar#event",
"etag": "\"2995719814846000\"",
"id": "51kj06ju8297jgjscgkhqso8mo",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=NTFrajA2anU4Mjk3amdqc2Nna2hxc284bW8gZjdqbmV0bTIyZHNqYzNucGMybHUzYnV2dTRAZw",
"created": "2015-05-27T10:17:22.000Z",
"updated": "2017-06-19T08:11:47.423Z",
"summary": "Install New Router in Dev Room",
"creator": {
"email": "user4652@gmail.com",
"displayName": "Donald Murphy"
},
"organizer": {
"email": "f7jnetm22dsjc3npc2lu3buvu4@group.calendar.google.com",
"displayName": "Shared",
"self": true
},
"start": {
"dateTime": "2017-05-22T23:30:00+01:00",
"timeZone": "UTC"
},
"end": {
"dateTime": "2017-05-23T00:30:00+01:00",
"timeZone": "UTC"
},
"iCalUID": "51kj06ju8297jgjscgkhqso8mo@google.com",
"sequence": 5,
"eventType": "default"
},
{
"kind": "calendar#event",
"etag": "\"2995719938618000\"",
"id": "62nu6c6mirh5ded3dfnjag4s70",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=NjJudTZjNm1pcmg1ZGVkM2RmbmphZzRzNzAgZjdqbmV0bTIyZHNqYzNucGMybHUzYnV2dTRAZw",
"created": "2015-05-27T09:30:31.000Z",
"updated": "2017-06-19T08:12:49.309Z",
"summary": "Upgrade Personal Computers",
"creator": {
"email": "user4652@gmail.com",
"displayName": "Donald Murphy"
},
"organizer": {
"email": "f7jnetm22dsjc3npc2lu3buvu4@group.calendar.google.com",
"displayName": "Shared",
"self": true
},
"start": {
"dateTime": "2017-05-24T20:15:00+01:00",
"timeZone": "UTC"
},
"end": {
"dateTime": "2017-05-24T23:30:00+01:00",
"timeZone": "UTC"
},
"iCalUID": "62nu6c6mirh5ded3dfnjag4s70@google.com",
"sequence": 8,
"eventType": "default"
}
]
}
Loading
Loading