Skip to content

Commit 30ec5fe

Browse files
Move HtmlEditor, FileUploader tests into Editors folder
2 parents 10c7531 + e50a006 commit 30ec5fe

7 files changed

Lines changed: 151 additions & 123 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Our DevExtreme [SpeechToText](/Documentation/ApiReference/UI_Components/dxSpeechToText) component allows you to integrate voice input to your app. The component implements the [Web Speech API SpeechRecognition](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition) interface and supports [custom speech recognizers](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#customSpeechRecognizer).
1+
Our DevExtreme [SpeechToText](/Documentation/ApiReference/UI_Components/dxSpeechToText) component allows you to integrate voice input into your app. The component implements the [Web Speech API SpeechRecognition](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition) interface and supports [custom speech recognizers](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#customSpeechRecognizer).
22

33
<!--split-->
44

5-
You can integrate SpeechToText with any text input, including other [DevExtreme components](https://js.devexpress.com/jQuery/Demos/WidgetsGallery/). To do this, set the component's **value** property to the transcribed text. SpeechToText returns transcribed text in the [onResult](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#onResult) handler as users speak. When speech stops, the component calls the [onEnd](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#onEnd) handler and switches from the "listening" state to the initial state. SpeechToText implements different icon ([startIcon](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#startIcon)/[stopIcon](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#stopIcon)), text ([startText](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#startText)/[stopText](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#stopText)), and click handler ([onStartClick](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#onStartClick)/[onStopClick](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#onStopClick)) properties in each component state.
5+
You can integrate SpeechToText with any text input, including other [DevExtreme components](https://js.devexpress.com/jQuery/Demos/WidgetsGallery/). To do this, set a component's **value** property to the transcribed text. SpeechToText returns transcribed text in the [onResult](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#onResult) handler as users speak. When speech stops, the component calls the [onEnd](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#onEnd) handler and switches from the "listening" state to the initial state. SpeechToText implements different icon ([startIcon](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#startIcon)/[stopIcon](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#stopIcon)), text ([startText](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#startText)/[stopText](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#stopText)), and click handler ([onStartClick](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#onStartClick)/[onStopClick](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/#onStopClick)) properties in each component state.
66

77
For a complete overview of SpeechToText options (including [Web Speech API options](/Documentation/ApiReference/UI_Components/dxSpeechToText/Configuration/speechRecognitionConfig/)), refer to the following topic: [SpeechToText API Reference](/Documentation/ApiReference/UI_Components/dxSpeechToText/).
Lines changed: 107 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1,120 +1,120 @@
1-
// import Scheduler from 'devextreme-testcafe-models/scheduler';
2-
// import { createWidget } from '../../../helpers/createWidget';
3-
// import url from '../../../helpers/getPageUrl';
1+
import Scheduler from 'devextreme-testcafe-models/scheduler';
2+
import { createWidget } from '../../../helpers/createWidget';
3+
import url from '../../../helpers/getPageUrl';
44

5-
// fixture.disablePageReloads`Scheduler - Status`
6-
// .page(url(__dirname, '../../container.html'));
5+
fixture.disablePageReloads`Scheduler - Status`
6+
.page(url(__dirname, '../../container.html'));
77

8-
// const today = '2025-04-30T15:00:00.000Z';
9-
// const appointments = [
10-
// {
11-
// startDate: '2025-04-25T21:30:00.000Z',
12-
// endDate: '2025-04-25T23:30:00.000Z',
13-
// recurrenceRule: 'FREQ=HOURLY;INTERVAL=15;COUNT=15',
14-
// }, {
15-
// startDate: '2025-04-30T15:00:00.000Z',
16-
// endDate: '2025-04-30T16:00:00.000Z',
17-
// }, {
18-
// startDate: '2025-04-26T00:30:00.000Z',
19-
// endDate: '2025-04-26T02:30:00.000Z',
20-
// recurrenceRule: 'FREQ=HOURLY;INTERVAL=15;COUNT=15',
21-
// }, {
22-
// startDate: '2025-05-02T15:00:00.000Z',
23-
// endDate: '2025-05-02T16:00:00.000Z',
24-
// },
25-
// ];
8+
const today = '2025-04-30T15:00:00.000Z';
9+
const appointments = [
10+
{
11+
startDate: '2025-04-25T21:30:00.000Z',
12+
endDate: '2025-04-25T23:30:00.000Z',
13+
recurrenceRule: 'FREQ=HOURLY;INTERVAL=15;COUNT=15',
14+
}, {
15+
startDate: '2025-04-30T15:00:00.000Z',
16+
endDate: '2025-04-30T16:00:00.000Z',
17+
}, {
18+
startDate: '2025-04-26T00:30:00.000Z',
19+
endDate: '2025-04-26T02:30:00.000Z',
20+
recurrenceRule: 'FREQ=HOURLY;INTERVAL=15;COUNT=15',
21+
}, {
22+
startDate: '2025-05-02T15:00:00.000Z',
23+
endDate: '2025-05-02T16:00:00.000Z',
24+
},
25+
];
2626

27-
// const statusCheck = async (t: TestController, scheduler: Scheduler, status: string) => {
28-
// await t.expect(scheduler.element.getAttribute('aria-label')).contains(status);
29-
// await t.expect(scheduler.getGeneralStatusContainer().textContent).contains(status);
30-
// };
31-
// const statusCheckEql = async (t: TestController, scheduler: Scheduler, status: string) => {
32-
// await t.expect(scheduler.element.getAttribute('aria-label')).match(new RegExp(status));
33-
// await t.expect(scheduler.getGeneralStatusContainer().textContent).match(new RegExp(status));
34-
// };
27+
const statusCheck = async (t: TestController, scheduler: Scheduler, status: string) => {
28+
await t.expect(scheduler.element.getAttribute('aria-label')).contains(status);
29+
await t.expect(scheduler.getGeneralStatusContainer().textContent).contains(status);
30+
};
31+
const statusCheckEql = async (t: TestController, scheduler: Scheduler, status: string) => {
32+
await t.expect(scheduler.element.getAttribute('aria-label')).match(new RegExp(status));
33+
await t.expect(scheduler.getGeneralStatusContainer().textContent).match(new RegExp(status));
34+
};
3535

36-
// const options = [
37-
// ['agenda', 'Agenda view: from April 30, 2025 to May 6, 2025', [0, 9, 19]],
38-
// ['day', 'Day view: April 30, 2025', [0, 3, 5]],
39-
// ['month', 'Month view: from March 2025 to May 2025', [0, 17, 35]],
40-
// ['timelineDay', 'Timeline Day view: April 30, 2025', [0, 3, 5]],
41-
// ['timelineMonth', 'Timeline Month view: April 2025', [0, 11, 21]],
42-
// ['timelineWeek', 'Timeline Week view: from April 27, 2025 to May 3, 2025', [0, 12, 25]],
43-
// ['timelineWorkWeek', 'Timeline Work Week view: from April 28, 2025 to May 2, 2025', [0, 9, 18]],
44-
// ['week', 'Week view: from April 27, 2025 to May 3, 2025', [0, 13, 27]],
45-
// ['workWeek', 'Work Week view: from April 28, 2025 to May 2, 2025', [0, 10, 20]],
46-
// ['Two Weeks', 'Two Weeks view: from April 27, 2025 to May 10, 2025', [0, 14, 29]],
47-
// ] as const;
48-
// const indicatorOnView = 'The current time indicator is visible in the view';
49-
// const indicatorNotOnView = 'The current time indicator is not visible on the screen';
36+
const options = [
37+
['agenda', 'Agenda view: from April 30, 2025 to May 6, 2025', [0, 9, 19]],
38+
['day', 'Day view: April 30, 2025', [0, 3, 5]],
39+
['month', 'Month view: from March 2025 to May 2025', [0, 17, 35]],
40+
['timelineDay', 'Timeline Day view: April 30, 2025', [0, 3, 5]],
41+
['timelineMonth', 'Timeline Month view: April 2025', [0, 11, 21]],
42+
['timelineWeek', 'Timeline Week view: from April 27, 2025 to May 3, 2025', [0, 12, 25]],
43+
['timelineWorkWeek', 'Timeline Work Week view: from April 28, 2025 to May 2, 2025', [0, 9, 18]],
44+
['week', 'Week view: from April 27, 2025 to May 3, 2025', [0, 13, 27]],
45+
['workWeek', 'Work Week view: from April 28, 2025 to May 2, 2025', [0, 10, 20]],
46+
['Two Weeks', 'Two Weeks view: from April 27, 2025 to May 10, 2025', [0, 14, 29]],
47+
] as const;
48+
const indicatorOnView = 'The current time indicator is visible in the view';
49+
const indicatorNotOnView = 'The current time indicator is not visible on the screen';
5050

51-
// options.forEach(([currentView, title, counts]) => {
52-
// counts.forEach((appointmentsCount, index) => {
53-
// const schedulerConfig = {
54-
// timeZone: 'America/Los_Angeles',
55-
// dataSource: appointments.slice(0, 2 * index),
56-
// views: [
57-
// 'agenda', 'day', 'month', 'timelineDay', 'timelineMonth', 'timelineWeek', 'timelineWorkWeek', 'week', 'workWeek', {
58-
// name: 'Two Weeks',
59-
// type: 'week',
60-
// intervalCount: 2,
61-
// },
62-
// ],
63-
// currentView,
64-
// indicatorTime: today,
65-
// currentDate: today,
66-
// };
67-
// // TODO(2): use `appointmentsCount` here
68-
// const generalStatus = `Scheduler. ${title} with ${index === 0 ? 0 : '\\d*'} appointments`;
51+
options.forEach(([currentView, title, counts]) => {
52+
counts.forEach((appointmentsCount, index) => {
53+
const schedulerConfig = {
54+
timeZone: 'America/Los_Angeles',
55+
dataSource: appointments.slice(0, 2 * index),
56+
views: [
57+
'agenda', 'day', 'month', 'timelineDay', 'timelineMonth', 'timelineWeek', 'timelineWorkWeek', 'week', 'workWeek', {
58+
name: 'Two Weeks',
59+
type: 'week',
60+
intervalCount: 2,
61+
},
62+
],
63+
currentView,
64+
indicatorTime: today,
65+
currentDate: today,
66+
};
67+
// TODO(2): use `appointmentsCount` here
68+
const generalStatus = `Scheduler. ${title} with ${index === 0 ? 0 : '\\d*'} appointments`;
6969

70-
// test(`Scheduler should have correct status message [view=${currentView}, count=${appointmentsCount}, indicator=false]`, async (t) => {
71-
// const scheduler = new Scheduler('#container');
70+
test(`Scheduler should have correct status message [view=${currentView}, count=${appointmentsCount}, indicator=false]`, async (t) => {
71+
const scheduler = new Scheduler('#container');
7272

73-
// await statusCheckEql(t, scheduler, generalStatus);
74-
// }).before(async () => {
75-
// await createWidget('dxScheduler', { ...schedulerConfig, showCurrentTimeIndicator: false });
76-
// });
73+
await statusCheckEql(t, scheduler, generalStatus);
74+
}).before(async () => {
75+
await createWidget('dxScheduler', { ...schedulerConfig, showCurrentTimeIndicator: false });
76+
});
7777

78-
// test(`Scheduler should have correct status message [view=${currentView}, count=${appointmentsCount}, indicator=true]`, async (t) => {
79-
// const scheduler = new Scheduler('#container');
78+
test(`Scheduler should have correct status message [view=${currentView}, count=${appointmentsCount}, indicator=true]`, async (t) => {
79+
const scheduler = new Scheduler('#container');
8080

81-
// await t.click(scheduler.toolbar.navigator.nextButton);
82-
// await statusCheck(t, scheduler, currentView === 'month' ? indicatorOnView : indicatorNotOnView);
81+
await t.click(scheduler.toolbar.navigator.nextButton);
82+
await statusCheck(t, scheduler, currentView === 'month' ? indicatorOnView : indicatorNotOnView);
8383

84-
// await t.click(scheduler.toolbar.navigator.prevButton);
85-
// await statusCheckEql(t, scheduler, `${generalStatus}. ${indicatorOnView}`);
84+
await t.click(scheduler.toolbar.navigator.prevButton);
85+
await statusCheckEql(t, scheduler, `${generalStatus}. ${indicatorOnView}`);
8686

87-
// await t.click(scheduler.toolbar.navigator.prevButton);
88-
// await statusCheck(t, scheduler, indicatorNotOnView);
89-
// }).before(async () => {
90-
// await createWidget('dxScheduler', { ...schedulerConfig, showCurrentTimeIndicator: true });
91-
// });
92-
// });
93-
// });
87+
await t.click(scheduler.toolbar.navigator.prevButton);
88+
await statusCheck(t, scheduler, indicatorNotOnView);
89+
}).before(async () => {
90+
await createWidget('dxScheduler', { ...schedulerConfig, showCurrentTimeIndicator: true });
91+
});
92+
});
93+
});
9494

95-
// [
96-
// ['timelineWeek', 'Scheduler. Timeline Week view: from April 27, 2025 to May 3, 2025 with 5 appointments'],
97-
// ['week', 'Scheduler. Week view: from April 27, 2025 to May 3, 2025 with 5 appointments'],
98-
// ].forEach(([currentView, title]) => {
99-
// test(`Scheduler should have correct status message if the appointments are partial [view=${currentView}]`, async (t) => {
100-
// const scheduler = new Scheduler('#container');
95+
[
96+
['timelineWeek', 'Scheduler. Timeline Week view: from April 27, 2025 to May 3, 2025 with 5 appointments'],
97+
['week', 'Scheduler. Week view: from April 27, 2025 to May 3, 2025 with 5 appointments'],
98+
].forEach(([currentView, title]) => {
99+
test(`Scheduler should have correct status message if the appointments are partial [view=${currentView}]`, async (t) => {
100+
const scheduler = new Scheduler('#container');
101101

102-
// await statusCheckEql(t, scheduler, title);
103-
// }).before(async () => {
104-
// await createWidget('dxScheduler', {
105-
// timeZone: 'America/Los_Angeles',
106-
// dataSource: [{
107-
// startDate: '2025-04-29T23:18:00.000Z',
108-
// endDate: '2025-04-30T16:12:00.000Z',
109-
// }, {
110-
// startDate: '2025-04-26T23:18:00.000Z',
111-
// endDate: '2025-04-27T12:12:00.000Z',
112-
// recurrenceRule: 'FREQ=DAILY;INTERVAL=2;COUNT=5',
113-
// }],
114-
// views: ['timelineWeek', 'week'],
115-
// currentView,
116-
// indicatorTime: today,
117-
// currentDate: today,
118-
// });
119-
// });
120-
// });
102+
await statusCheckEql(t, scheduler, title);
103+
}).before(async () => {
104+
await createWidget('dxScheduler', {
105+
timeZone: 'America/Los_Angeles',
106+
dataSource: [{
107+
startDate: '2025-04-29T23:18:00.000Z',
108+
endDate: '2025-04-30T16:12:00.000Z',
109+
}, {
110+
startDate: '2025-04-26T23:18:00.000Z',
111+
endDate: '2025-04-27T12:12:00.000Z',
112+
recurrenceRule: 'FREQ=DAILY;INTERVAL=2;COUNT=5',
113+
}],
114+
views: ['timelineWeek', 'week'],
115+
currentView,
116+
indicatorTime: today,
117+
currentDate: today,
118+
});
119+
});
120+
});

e2e/testcafe-devextreme/tests/accessibility/treeList/aria.ts

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import TreeList from 'devextreme-testcafe-models/treeList';
22
import { createWidget } from '../../../helpers/createWidget';
33
import url from '../../../helpers/getPageUrl';
4+
import { isMaterial } from '../../../helpers/themeUtils';
45

56
fixture`TreeList - Aria Label`.page(url(__dirname, '../../container.html'));
67

@@ -84,23 +85,27 @@ test('Aria expanded should be toggled true on Ctrl + → keypress', async (t) =>
8485

8586
await t
8687
.expect(treeList.getContainer().getAttribute('aria-label'))
87-
.eql('Tree list with 1 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it')
88+
.eql(isMaterial()
89+
? 'Tree list with 3 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it'
90+
: 'Tree list with 1 rows and 3 columns. Press Ctrl + right arrow to expand the focused node and Ctrl + left arrow to collapse it')
8891
.expect(expandableRow.getAttribute('aria-expanded'))
8992
.eql('false');
9093

91-
expandableCells.map(async (cell) => {
94+
// eslint-disable-next-line no-restricted-syntax
95+
for (const cell of expandableCells) {
9296
await t.expect(cell.getAttribute('aria-expanded')).eql('false');
93-
});
97+
}
9498

9599
await t
96100
.click(expandableRow)
97101
.pressKey('ctrl+right')
98102
.expect(expandableRow.getAttribute('aria-expanded'))
99103
.eql('true');
100104

101-
expandableCells.map(async (cell) => {
105+
// eslint-disable-next-line no-restricted-syntax
106+
for (const cell of expandableCells) {
102107
await t.expect(cell.getAttribute('aria-expanded')).eql('true');
103-
});
108+
}
104109
}).before(async () => createWidget('dxTreeList', options));
105110

106111
test('Aria expanded should be toggled false on Ctrl + ← keypress', async (t) => {
@@ -118,19 +123,21 @@ test('Aria expanded should be toggled false on Ctrl + ← keypress', async (t) =
118123
.expect(expandableRow.getAttribute('aria-expanded'))
119124
.eql('true');
120125

121-
expandableCells.map(async (cell) => {
126+
// eslint-disable-next-line no-restricted-syntax
127+
for (const cell of expandableCells) {
122128
await t.expect(cell.getAttribute('aria-expanded')).eql('true');
123-
});
129+
}
124130

125131
await t
126132
.click(expandableRow)
127133
.pressKey('ctrl+left')
128134
.expect(expandableRow.getAttribute('aria-expanded'))
129135
.eql('false');
130136

131-
expandableCells.map(async (cell) => {
137+
// eslint-disable-next-line no-restricted-syntax
138+
for (const cell of expandableCells) {
132139
await t.expect(cell.getAttribute('aria-expanded')).eql('false');
133-
});
140+
}
134141
}).before(async () => {
135142
options.expandedRowKeys = [1];
136143
await createWidget('dxTreeList', options);

e2e/testcafe-devextreme/tests/accessibility/treeList/status.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import TreeList from 'devextreme-testcafe-models/treeList';
44
import { a11yCheck } from '../../../helpers/accessibility/utils';
55
import url from '../../../helpers/getPageUrl';
66
import { createWidget } from '../../../helpers/createWidget';
7+
import { isMaterialBased } from '../../../helpers/themeUtils';
78

89
fixture`TreeList - Status`
910
.page(url(__dirname, '../../container.html'));
@@ -35,7 +36,7 @@ test('Accessibility: TreeList general status should contains correct text (rows
3536
const statusText = await treeList.getGeneralStatusContainer().textContent;
3637

3738
await a11yCheck(t);
38-
await t.expect(statusText).eql(expectedStatusText);
39+
await t.expect(statusText).eql(isMaterialBased() ? '' : expectedStatusText);
3940
}).before(async () => createWidget('dxTreeList', {
4041
dataSource: DATA_SOURCE,
4142
rootValue: -1,
@@ -52,7 +53,7 @@ test('Accessibility: TreeList general status should contains correct text (rows
5253
const statusText = await treeList.getGeneralStatusContainer().textContent;
5354

5455
await a11yCheck(t);
55-
await t.expect(statusText).eql(expectedStatusText);
56+
await t.expect(statusText).eql(isMaterialBased() ? '' : expectedStatusText);
5657
}).before(async () => createWidget('dxTreeList', {
5758
dataSource: DATA_SOURCE,
5859
rootValue: -1,

e2e/testcafe-devextreme/tests/dataGrid/common/keyboardNavigation/startEditing.functional.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ test('Editing should start by pressing enter after scrolling content with scroll
4040
test('editing.allowUpdating callback should receive correct row on tab key on first cell with virtual scrolling (T1290811)', async (t) => {
4141
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);
4242

43+
await t.expect(dataGrid.isReady()).ok();
44+
4345
await dataGrid.scrollBy({ y: 10000 });
4446

4547
await t
@@ -80,6 +82,8 @@ test('editing.allowUpdating callback should receive correct row on tab key on fi
8082
test('editing.allowUpdating callback should receive correct row on tab key on last cell with virtual scrolling (T1290811)', async (t) => {
8183
const dataGrid = new DataGrid(DATA_GRID_SELECTOR);
8284

85+
await t.expect(dataGrid.isReady()).ok();
86+
8387
await dataGrid.scrollBy({ y: 10000 });
8488

8589
await t

0 commit comments

Comments
 (0)