-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '24_2' of https://github.com/DevExpress/DevExtreme into …
…24_2_update_demos_menu
- Loading branch information
Showing
16 changed files
with
408 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ | |
</div> | ||
</template> | ||
</template> | ||
<DxChat/> | ||
</DxChat> | ||
</div> | ||
</template> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+398 Bytes
(100%)
...me/tests/chat/etalons/Typing indicator with emptyview (material-blue-light).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
e2e/testcafe-devextreme/tests/scheduler/dragAndDrop/T1263508.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import Scheduler from 'devextreme-testcafe-models/scheduler'; | ||
import { ClientFunction, Selector } from 'testcafe'; | ||
import { MouseAction, MouseUpEvents } from '../../../helpers/mouseUpEvents'; | ||
import { createWidget } from '../../../helpers/createWidget'; | ||
import url from '../../../helpers/getPageUrl'; | ||
|
||
fixture.disablePageReloads`Scheduler Drag-and-Drop Fix` | ||
.page(url(__dirname, '../../container.html')); | ||
|
||
const DRAGGABLE_ITEM_CLASS = 'dx-card'; | ||
const draggingGroupName = 'appointmentsGroup'; | ||
|
||
const initList = ClientFunction(() => { | ||
$('<div>', { id: 'list' }).appendTo('#parentContainer'); | ||
}); | ||
|
||
const addTasksToList = ClientFunction((tasks) => { | ||
tasks.forEach((task) => { | ||
$('<div>', { | ||
class: 'dx-card', | ||
text: task.text, | ||
}).appendTo('#list'); | ||
}); | ||
}); | ||
|
||
const createItemElement = async (task) => { | ||
await createWidget('dxDraggable', { | ||
group: draggingGroupName, | ||
data: task, | ||
clone: true, | ||
onDragStart(e) { | ||
e.itemData = e.fromData; | ||
}, | ||
}, `.${DRAGGABLE_ITEM_CLASS}:contains(${task.text})`); | ||
}; | ||
|
||
test('Scheduler - The \'Cannot read properties of undefined (reading \'getTime\')\' error is thrown on an attempt to drag an outside element if the previous drag operation was canceled', async (t) => { | ||
const scheduler = new Scheduler('#container'); | ||
const draggableAppointment = scheduler.getAppointment('Book').element; | ||
const targetCell = scheduler.getDateTableCell(5, 0); | ||
const draggableItem = Selector(`.${DRAGGABLE_ITEM_CLASS}`).withText('Brochures'); | ||
|
||
await t.expect(scheduler.element.exists).ok(); | ||
|
||
await MouseUpEvents.disable(MouseAction.dragToElement); | ||
|
||
await t | ||
.dragToElement(draggableAppointment, targetCell) | ||
.pressKey('esc'); | ||
|
||
await MouseUpEvents.enable(MouseAction.dragToElement); | ||
|
||
await t | ||
.expect(draggableItem.exists) | ||
.ok() | ||
.dragToElement(draggableItem, targetCell); | ||
|
||
const newAppointment = scheduler.getAppointment('Brochures'); | ||
|
||
await t | ||
.expect(newAppointment.element.exists) | ||
.ok(); | ||
}).before(async () => { | ||
const tasks = [ | ||
{ text: 'Brochures' }, | ||
]; | ||
|
||
await initList(); | ||
await addTasksToList(tasks); | ||
await Promise.all(tasks.map((task) => createItemElement(task))); | ||
await createWidget('dxScheduler', { | ||
timeZone: 'America/Los_Angeles', | ||
dataSource: [ | ||
{ | ||
text: 'Book', | ||
startDate: new Date('2021-04-26T19:00:00.000Z'), | ||
endDate: new Date('2021-04-26T20:00:00.000Z'), | ||
}, | ||
], | ||
currentDate: new Date(2021, 3, 26), | ||
startDayHour: 9, | ||
height: 600, | ||
editing: true, | ||
appointmentDragging: { | ||
group: draggingGroupName, | ||
onDragEnd(e) { | ||
e.cancel = e.event.ctrlKey; | ||
}, | ||
onRemove(e) { | ||
e.component.deleteAppointment(e.itemData); | ||
}, | ||
onAdd(e) { | ||
e.component.addAppointment(e.itemData); | ||
}, | ||
}, | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import TreeList from 'devextreme-testcafe-models/treeList'; | ||
import url from '../../../helpers/getPageUrl'; | ||
import { createWidget } from '../../../helpers/createWidget'; | ||
|
||
fixture`Treelist - Editing`.page(url(__dirname, '../../container.html')); | ||
|
||
// T1247158 | ||
test('TreeList - Insertafterkey doesn\'t work on children nodes', async (t) => { | ||
const treeList = new TreeList('#container'); | ||
const expectedInsertedRowIndex = 2; | ||
|
||
await t | ||
.click(treeList.getDataCell(1, 0).element) | ||
.pressKey('ctrl+enter') | ||
.expect(treeList.getDataRow(expectedInsertedRowIndex).isInserted) | ||
.ok(); | ||
}).before(async () => createWidget('dxTreeList', { | ||
dataSource: [ | ||
{ | ||
ID: 1, | ||
Head_ID: -1, | ||
Full_Name: 'John Heart', | ||
}, | ||
{ | ||
ID: 2, | ||
Head_ID: 1, | ||
Full_Name: 'Samantha Bright', | ||
}, | ||
], | ||
rootValue: -1, | ||
keyExpr: 'ID', | ||
parentIdExpr: 'Head_ID', | ||
columns: ['Full_Name'], | ||
editing: { | ||
mode: 'batch', | ||
allowAdding: true, | ||
allowUpdating: true, | ||
useIcons: true, | ||
}, | ||
focusedRowEnabled: true, | ||
expandedRowKeys: [1], | ||
onKeyDown(e) { | ||
if (e.event.ctrlKey && e.event.key === 'Enter') { | ||
const currentSelectedParentTaskId = e.component.getNodeByKey( | ||
e.component.option('focusedRowKey'), | ||
)?.parent?.key; | ||
const key = new (window as any).DevExpress.data.Guid().toString(); | ||
const data = { Head_ID: currentSelectedParentTaskId }; | ||
e.component.option('editing.changes', [ | ||
{ | ||
key, | ||
type: 'insert', | ||
insertAfterKey: e.component.option('focusedRowKey'), | ||
data, | ||
}, | ||
]); | ||
} | ||
}, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.