Scheduler - Rewrite deleteAppointments.ts testcafe tests to jest #33105
Scheduler - Rewrite deleteAppointments.ts testcafe tests to jest #33105Tucchhaa merged 4 commits intoDevExpress:26_1from
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates Scheduler “delete appointments” coverage from TestCafe E2E to Jest-based internal scheduler tests.
Changes:
- Reorganized and expanded keyboard-navigation tests in
appointments.test.ts, adding Delete hotkey coverage (single and recurring cases). - Expanded
appointment_tooltip.test.tsto cover deleting from the collector tooltip (button click, Delete key, allowDeleting=false, disabled appointments, recurring deletion dialogs). - Extended the Jest test POM (
PopupModel) with recurrence delete dialog button accessors and removed the old TestCafe suite.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/devextreme/js/__internal/scheduler/tests/appointments.test.ts | Adds Jest coverage for Delete hotkey behavior and groups Home/End hotkey tests. |
| packages/devextreme/js/__internal/scheduler/tests/appointment_tooltip.test.ts | Adds Jest coverage for deleting appointments via tooltip interactions, including recurrence dialogs and guard cases. |
| packages/devextreme/js/__internal/scheduler/tests/mock/model/popup.ts | Adds POM getters for “Delete series” / “Delete appointment” dialog buttons used by new tests. |
| e2e/testcafe-devextreme/tests/scheduler/common/deleteAppointments.ts | Removes the superseded TestCafe E2E tests. |
| it('should delete appointment on Delete', async () => { | ||
| const { POM, keydown } = await createScheduler({ | ||
| dataSource: [{ | ||
| text: 'Recurring Appointment', |
There was a problem hiding this comment.
minor: it is not a recurring appointment
| POM.getCollectorButton().click(); | ||
| POM.tooltip.getDeleteButton().click(); | ||
| const { POM, scheduler } = await createScheduler({ | ||
| dataSource: data, |
There was a problem hiding this comment.
minor: in all other tests we use spread operator on data in dataSource. Can you do same here?
| ]); | ||
|
|
||
| expect((scheduler as any).getDataSource().items()).toEqual([...data]); | ||
| expect(Boolean(items[1].recurrenceException)).toBe(true); |
There was a problem hiding this comment.
How about changing this line to something like
expect(items[1].recurrenceException).toContain('20170522');
I saw that before there was an exception validation. This will be more secure
There was a problem hiding this comment.
Good suggestion, thanks. I've applied it
No description provided.