Skip to content

Commit d386f4b

Browse files
committed
fix: fix test
1 parent 08f8d31 commit d386f4b

1 file changed

Lines changed: 0 additions & 49 deletions

File tree

packages/devextreme/js/__internal/scheduler/__tests__/selection_end_event.test.ts

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -48,53 +48,4 @@ describe('onSelectionEnd', () => {
4848

4949
support.touch = originalSupportTouch;
5050
});
51-
52-
it('should not fire onSelectionEnd when clicking on an already-selected cell', async () => {
53-
const onSelectionEnd = jest.fn<(e: SelectionEndEvent) => void>();
54-
55-
const { POM } = await createScheduler({
56-
...defaultOptions,
57-
onSelectionEnd,
58-
});
59-
60-
const firstCell = POM.getDateTableCell(0, 0);
61-
const secondCell = POM.getDateTableCell(1, 0);
62-
const thirdCell = POM.getDateTableCell(2, 0);
63-
64-
fireEvent.mouseDown(firstCell, { which: 1 });
65-
fireEvent.mouseMove(secondCell);
66-
fireEvent.mouseMove(thirdCell);
67-
fireEvent.mouseUp(thirdCell);
68-
69-
expect(onSelectionEnd).toHaveBeenCalledTimes(1);
70-
71-
fireEvent.mouseDown(thirdCell, { which: 1 });
72-
fireEvent.mouseUp(thirdCell);
73-
74-
expect(onSelectionEnd).toHaveBeenCalledTimes(1);
75-
});
76-
77-
it('should fire onSelectionEnd independently for each Scheduler instance on the page', async () => {
78-
const onSelectionEndA = jest.fn<(e: SelectionEndEvent) => void>();
79-
const onSelectionEndB = jest.fn<(e: SelectionEndEvent) => void>();
80-
81-
const { POM: POMA } = await createScheduler({
82-
...defaultOptions,
83-
onSelectionEnd: onSelectionEndA,
84-
});
85-
await createScheduler({
86-
...defaultOptions,
87-
onSelectionEnd: onSelectionEndB,
88-
});
89-
90-
const firstCell = POMA.getDateTableCell(0, 0);
91-
const secondCell = POMA.getDateTableCell(1, 0);
92-
93-
fireEvent.mouseDown(firstCell, { which: 1 });
94-
fireEvent.mouseMove(secondCell);
95-
fireEvent.mouseUp(secondCell);
96-
97-
expect(onSelectionEndA).toHaveBeenCalledTimes(1);
98-
expect(onSelectionEndB).toHaveBeenCalledTimes(0);
99-
});
10051
});

0 commit comments

Comments
 (0)