Skip to content

Scheduler - Rewrite deleteAppointments.ts testcafe tests to jest #33105

Merged
Tucchhaa merged 4 commits intoDevExpress:26_1from
Tucchhaa:fix_unstable_testcafe_test_26_1
Apr 1, 2026
Merged

Scheduler - Rewrite deleteAppointments.ts testcafe tests to jest #33105
Tucchhaa merged 4 commits intoDevExpress:26_1from
Tucchhaa:fix_unstable_testcafe_test_26_1

Conversation

@Tucchhaa
Copy link
Copy Markdown
Contributor

No description provided.

@Tucchhaa Tucchhaa self-assigned this Mar 31, 2026
@Tucchhaa Tucchhaa added the 26_1 label Mar 31, 2026
@Tucchhaa Tucchhaa marked this pull request as ready for review March 31, 2026 16:01
@Tucchhaa Tucchhaa requested a review from a team as a code owner March 31, 2026 16:01
Copilot AI review requested due to automatic review settings March 31, 2026 16:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.ts to 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',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: it is not a recurring appointment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

POM.getCollectorButton().click();
POM.tooltip.getDeleteButton().click();
const { POM, scheduler } = await createScheduler({
dataSource: data,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: in all other tests we use spread operator on data in dataSource. Can you do same here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

]);

expect((scheduler as any).getDataSource().items()).toEqual([...data]);
expect(Boolean(items[1].recurrenceException)).toBe(true);
Copy link
Copy Markdown
Contributor

@sjbur sjbur Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, thanks. I've applied it

@Tucchhaa Tucchhaa merged commit fde41ea into DevExpress:26_1 Apr 1, 2026
127 of 128 checks passed
@Tucchhaa Tucchhaa deleted the fix_unstable_testcafe_test_26_1 branch April 1, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants