Skip to content

Commit

Permalink
Scheduler - qunit tests refactoring (#7250)
Browse files Browse the repository at this point in the history
* Improved render performance: reduces the count of changes in DOM (T665469) (#7212)

* Refactoring render engine

* Refactoring

* Rename arg

* Fix agenda rendering

* test hypothesis

* text hypothesis

* Fix: convert to jquery element

* fix test

* Refactoring

* Scheduler - qunit tests refactoring
  • Loading branch information
andrewmakarov authored Mar 12, 2019
1 parent b4e6c40 commit a95d072
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,17 @@ const renderLayoutModuleOptions = {
})).dxScheduler("instance");
};

this.markAppointments = () => document.querySelectorAll(APPOINTMENT_CLASS_NAME).forEach(element => element.dataset.mark = 'true');
this.markAppointments = function() {
$(APPOINTMENT_CLASS_NAME).data("mark", true);
};

this.getUnmarkedAppointments = () => {
return Array.from(document.querySelectorAll(APPOINTMENT_CLASS_NAME)).filter(element => !!element.dataset.mark === false);
this.getUnmarkedAppointments = function() {
return $(APPOINTMENT_CLASS_NAME).filter(function() {
return !!$(this).data("mark") === false;
});
};

this.getAppointments = () => document.querySelectorAll(APPOINTMENT_CLASS_NAME);
this.getAppointments = function() { return document.querySelectorAll(APPOINTMENT_CLASS_NAME); };
},
afterEach: function() {
this.clock.restore();
Expand Down

0 comments on commit a95d072

Please sign in to comment.