Skip to content

Scheduler - Fix unstable tests - QUnit - integration.dstAppointments.tests.js#32643

Draft
aleksei-semikozov wants to merge 3 commits intoDevExpress:26_1from
aleksei-semikozov:fix/3261-scheduler-unstable-tests-dst_26_1
Draft

Scheduler - Fix unstable tests - QUnit - integration.dstAppointments.tests.js#32643
aleksei-semikozov wants to merge 3 commits intoDevExpress:26_1from
aleksei-semikozov:fix/3261-scheduler-unstable-tests-dst_26_1

Conversation

@aleksei-semikozov
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 19, 2026 17:34
@aleksei-semikozov aleksei-semikozov requested a review from a team as a code owner February 19, 2026 17:34
Copy link
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

This PR fixes unstable QUnit tests for DST (Daylight Saving Time) appointments in the Scheduler component by unskipping previously skipped test modules and updating them with proper test patterns to ensure stability.

Changes:

  • Unskipped two test modules by changing QUnit.skip to QUnit.module
  • Added legacyForm: true configuration to tests that verify appointment form behavior
  • Implemented fake timer pattern for appointment clicks to prevent timing issues
  • Removed several tests that checked appointment rendering positions (likely unstable)
  • Updated assertions to expect appointment timezone times instead of converted scheduler timezone times (matching legacyForm behavior)
  • Removed unused timeZoneUtils import
  • Removed one complete test about recurrence exception deletion behavior
Comments suppressed due to low confidence (1)

packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.dstAppointments.tests.js:360

  • The assertion message 'Appointment was deleted' is misleading. This test verifies that a recurrence exception is not rendered after timezone adjustment, not that an appointment was deleted. The test doesn't perform any delete action. Consider changing the message to something like 'exception is not rendered' or 'correct number of events after timezone change' to accurately reflect what the test is verifying.
        assert.equal(scheduler.appointments.getAppointmentCount(), 0, 'Appointment was deleted');

Copilot AI review requested due to automatic review settings February 19, 2026 22:49
Copy link
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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.dstAppointments.tests.js:35

  • Stubbing Date.prototype.getTimezoneOffset in the module hook is a very broad change that can impact unrelated Date logic inside the Scheduler, Sinon fake timers, and other helpers. In this codebase, timezone-dependent tests typically stub timeZoneUtils.getClientTimezoneOffset (and/or other timeZoneUtils helpers) instead of modifying Date.prototype directly (e.g. testing/tests/DevExpress.ui.widgets.scheduler/timezones.tests.js stubs getClientTimezoneOffset). Consider replacing the Date.prototype stub with a timeZoneUtils.getClientTimezoneOffset stub (or limiting the stub to the specific helper under test) to reduce side effects and keep the approach consistent with existing tests.
        this.tzStub = sinon.stub(timeZoneUtils, 'getDiffBetweenClientTimezoneOffsets').returns(0);

        // Stub getTimezoneOffset to return 0 (UTC) to avoid CI timezone affecting Date operations
        this.timezoneOffsetStub = sinon.stub(Date.prototype, 'getTimezoneOffset').returns(0);
    },

packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/integration.dstAppointments.tests.js:382

  • The final assertion message is misleading here: the test verifies that no occurrences are rendered due to recurrenceException, but the message says "Appointment was deleted". Updating the assertion text to describe the expected behavior (no appointment rendered because the occurrence is excluded) will make failures easier to diagnose.

        assert.equal(scheduler.appointments.getAppointmentCount(), 0, 'Appointment was deleted');

@aleksei-semikozov aleksei-semikozov marked this pull request as draft February 19, 2026 23:50
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.

1 participant

Comments