Tests: Use ES6 class syntax for inheritance in calendarFixtures.js#32769
Merged
r-farkhutdinov merged 3 commits into26_1from Mar 4, 2026
Merged
Tests: Use ES6 class syntax for inheritance in calendarFixtures.js#32769r-farkhutdinov merged 3 commits into26_1from
r-farkhutdinov merged 3 commits into26_1from
Conversation
Co-authored-by: r-farkhutdinov <23283554+r-farkhutdinov@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Use ES6 syntax for inheritance in calendarFixtures.js
Tests: Use ES6 class syntax for inheritance in calendarFixtures.js
Mar 3, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the calendar testing fixtures to use native ES6 class/extends syntax instead of the legacy Class.inherit() pattern, while keeping the fixtures available via the DevExpress.ui.testing.* global namespace for existing tests.
Changes:
- Replaced
Class.inherit()-based fixtures with ES6 classes (BaseCalendarFixture,CalendarFixture,DateBoxFixture). - Replaced
Views['month'].inherit(...)with an ES6 subclass (MockMonthView). - Switched from
$.extend(true, DevExpress.ui, { testing: ... })to directDevExpress.ui.testing.*assignments.
Contributor
|
@copilot fix the notes |
…darFixtures Co-authored-by: r-farkhutdinov <23283554+r-farkhutdinov@users.noreply.github.com>
Contributor
Author
Fixed in 62d0c44:
|
r-farkhutdinov
approved these changes
Mar 3, 2026
marker-dao
approved these changes
Mar 4, 2026
r-farkhutdinov
added a commit
to r-farkhutdinov/DevExtreme
that referenced
this pull request
Mar 4, 2026
…evExpress#32769) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: r-farkhutdinov <23283554+r-farkhutdinov@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the legacy
Class.inherit()pattern with ES6class/extendssyntax intesting/helpers/calendarFixtures.js, and removes the unusedMockMonthViewclass along with the unrecognizedmonthViewTypeoption.Changes
BaseCalendarFixture:Class.inherit({...})→class BaseCalendarFixture { ... }CalendarFixture/DateBoxFixture:.inherit({ctor: function(){...}})→class X extends BaseCalendarFixturewith properconstructorMockMonthView: The class overroderenderHeader/renderBody(wrong method names — the actual implementation uses_renderHeader/_renderBody), andmonthViewTypewas never a recognized option in dxCalendar or dxDateBox, so the mock was never invokedmonthViewTypefrom bothCalendarFixtureandDateBoxFixtureconstructors (unrecognized option)Class(fromcore/class),noop(fromcore/utils/common), andViews(fromcalendar.views) are no longer needed$.extend(true, DevExpress.ui, {...})blocks with direct property assignments to preserve backward compatibility with consumers usingDevExpress.ui.testing.*Before / After
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.