@@ -195,13 +195,11 @@ module('Work Space Day', {
195195 } ) ;
196196
197197 test ( 'Each cell should contain jQuery dxCellData' , async function ( assert ) {
198- this . instance . option ( 'renovateRender' , false ) ;
199-
200198 this . instance . option ( 'currentDate' , new Date ( 2015 , 2 , 16 ) ) ;
201199
202200 const $cell = this . instance . $element ( ) . find ( '.' + CELL_CLASS ) . first ( ) ;
203201
204- assert . deepEqual ( $cell . data ( 'dxCellData' ) , {
202+ assert . deepEqual ( this . instance . getCellData ( $cell ) , {
205203 startDate : new Date ( 2015 , 2 , 16 , 0 , 0 ) ,
206204 endDate : new Date ( 2015 , 2 , 16 , 0 , 30 ) ,
207205 allDay : false ,
@@ -210,19 +208,15 @@ module('Work Space Day', {
210208 } ) ;
211209
212210 test ( 'dxCellData should be \'immutable\'' , function ( assert ) {
213- this . instance . option ( 'renovateRender' , false ) ;
214-
215211 const $element = this . instance . $element ( ) ;
216212 const $cell = $element . find ( '.' + CELL_CLASS ) . first ( ) ;
217213 const cellData = this . instance . getCellData ( $cell ) ;
218214
219215 cellData . cellCustomField = 'cell-custom-data' ;
220- assert . strictEqual ( $element . find ( '.' + CELL_CLASS ) . first ( ) . data ( 'dxCellData' ) . cellCustomField , undefined , 'Cell data is not affected' ) ;
216+ assert . strictEqual ( this . instance . getCellData ( $element . find ( '.' + CELL_CLASS ) . first ( ) ) . cellCustomField , undefined , 'Cell data is not affected' ) ;
221217 } ) ;
222218
223219 test ( 'Cells have right cellData in vertical grouped WorkSpace Day view' , async function ( assert ) {
224- this . instance . option ( 'renovateRender' , false ) ;
225-
226220 await applyWorkspaceGroups ( this . instance , [ {
227221 label : 'one' ,
228222 fieldExpr : 'one' ,
@@ -234,8 +228,8 @@ module('Work Space Day', {
234228 startDayHour : 9 ,
235229 showAllDayPanel : false
236230 } ) ;
237- const firstCellData = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 0 ) . data ( 'dxCellData' ) ;
238- const secondCellData = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 36 ) . data ( 'dxCellData' ) ;
231+ const firstCellData = this . instance . getCellData ( this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 0 ) ) ;
232+ const secondCellData = this . instance . getCellData ( this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 36 ) ) ;
239233
240234 assert . deepEqual ( firstCellData . startDate , new Date ( 2018 , 2 , 16 , 9 ) , 'cell has right startDate' ) ;
241235 assert . deepEqual ( firstCellData . endDate , new Date ( 2018 , 2 , 16 , 9 , 30 ) , 'cell has right endDate' ) ;
@@ -284,12 +278,10 @@ module('Work Space Day with grouping by date', () => {
284278 } ) ;
285279
286280 test ( 'Date table cells shoud have right cellData, groupByDate = true' , async function ( assert ) {
287- this . instance . option ( 'renovateRender' , false ) ;
288-
289281 this . instance . option ( 'intervalCount' , 3 ) ;
290282 const $cells = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) ;
291283
292- assert . deepEqual ( $cells . eq ( 0 ) . data ( 'dxCellData' ) , {
284+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 0 ) ) , {
293285 startDate : new Date ( 2018 , 2 , 1 ) ,
294286 endDate : new Date ( 2018 , 2 , 1 , 0 , 30 ) ,
295287 allDay : false ,
@@ -299,7 +291,7 @@ module('Work Space Day with grouping by date', () => {
299291 groupIndex : 0 ,
300292 } ) ;
301293
302- assert . deepEqual ( $cells . eq ( 1 ) . data ( 'dxCellData' ) , {
294+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 1 ) ) , {
303295 startDate : new Date ( 2018 , 2 , 1 ) ,
304296 endDate : new Date ( 2018 , 2 , 1 , 0 , 30 ) ,
305297 allDay : false ,
@@ -309,7 +301,7 @@ module('Work Space Day with grouping by date', () => {
309301 groupIndex : 1 ,
310302 } ) ;
311303
312- assert . deepEqual ( $cells . eq ( 2 ) . data ( 'dxCellData' ) , {
304+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 2 ) ) , {
313305 startDate : new Date ( 2018 , 2 , 2 ) ,
314306 endDate : new Date ( 2018 , 2 , 2 , 0 , 30 ) ,
315307 allDay : false ,
@@ -319,7 +311,7 @@ module('Work Space Day with grouping by date', () => {
319311 groupIndex : 0 ,
320312 } ) ;
321313
322- assert . deepEqual ( $cells . eq ( 3 ) . data ( 'dxCellData' ) , {
314+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 3 ) ) , {
323315 startDate : new Date ( 2018 , 2 , 2 ) ,
324316 endDate : new Date ( 2018 , 2 , 2 , 0 , 30 ) ,
325317 allDay : false ,
@@ -329,7 +321,7 @@ module('Work Space Day with grouping by date', () => {
329321 groupIndex : 1 ,
330322 } ) ;
331323
332- assert . deepEqual ( $cells . eq ( 4 ) . data ( 'dxCellData' ) , {
324+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 4 ) ) , {
333325 startDate : new Date ( 2018 , 2 , 3 ) ,
334326 endDate : new Date ( 2018 , 2 , 3 , 0 , 30 ) ,
335327 allDay : false ,
@@ -339,7 +331,7 @@ module('Work Space Day with grouping by date', () => {
339331 groupIndex : 0 ,
340332 } ) ;
341333
342- assert . deepEqual ( $cells . eq ( 5 ) . data ( 'dxCellData' ) , {
334+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 5 ) ) , {
343335 startDate : new Date ( 2018 , 2 , 3 ) ,
344336 endDate : new Date ( 2018 , 2 , 3 , 0 , 30 ) ,
345337 allDay : false ,
@@ -351,34 +343,32 @@ module('Work Space Day with grouping by date', () => {
351343 } ) ;
352344
353345 test ( 'Date table cells should have right cellData, groupByDate = true without groups' , async function ( assert ) {
354- this . instance . option ( 'renovateRender' , false ) ;
355-
356346 this . instance . option ( 'getResourceManager' , getEmptyResourceManager ) ;
357347 this . instance . option ( 'groups' , [ ] ) ;
358348 const $cells = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) ;
359349
360- assert . deepEqual ( $cells . eq ( 0 ) . data ( 'dxCellData' ) , {
350+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 0 ) ) , {
361351 startDate : new Date ( 2018 , 2 , 1 ) ,
362352 endDate : new Date ( 2018 , 2 , 1 , 0 , 30 ) ,
363353 allDay : false ,
364354 groupIndex : 0 ,
365355 } ) ;
366356
367- assert . deepEqual ( $cells . eq ( 1 ) . data ( 'dxCellData' ) , {
357+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 1 ) ) , {
368358 startDate : new Date ( 2018 , 2 , 2 ) ,
369359 endDate : new Date ( 2018 , 2 , 2 , 0 , 30 ) ,
370360 allDay : false ,
371361 groupIndex : 0 ,
372362 } ) ;
373363
374- assert . deepEqual ( $cells . eq ( 2 ) . data ( 'dxCellData' ) , {
364+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 2 ) ) , {
375365 startDate : new Date ( 2018 , 2 , 1 , 0 , 30 ) ,
376366 endDate : new Date ( 2018 , 2 , 1 , 1 , 0 ) ,
377367 allDay : false ,
378368 groupIndex : 0 ,
379369 } ) ;
380370
381- assert . deepEqual ( $cells . eq ( 3 ) . data ( 'dxCellData' ) , {
371+ assert . deepEqual ( this . instance . getCellData ( $cells . eq ( 3 ) ) , {
382372 startDate : new Date ( 2018 , 2 , 2 , 0 , 30 ) ,
383373 endDate : new Date ( 2018 , 2 , 2 , 1 , 0 ) ,
384374 allDay : false ,
@@ -443,11 +433,10 @@ module('Work Space Day with grouping by date', () => {
443433 this . createInstance ( {
444434 intervalCount : 2 ,
445435 currentDate : new Date ( 2017 , 5 , 29 ) ,
446- renovateRender : false ,
447436 } ) ;
448437
449- const firstCellData = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 1 ) . data ( 'dxCellData' ) ;
450- const secondCellData = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 95 ) . data ( 'dxCellData' ) ;
438+ const firstCellData = this . instance . getCellData ( this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 1 ) ) ;
439+ const secondCellData = this . instance . getCellData ( this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 95 ) ) ;
451440
452441 assert . deepEqual ( firstCellData . startDate , new Date ( 2017 , 5 , 30 , 0 ) , 'cell has right startDate' ) ;
453442 assert . deepEqual ( firstCellData . endDate , new Date ( 2017 , 5 , 30 , 0 , 30 ) , 'cell has right endtDate' ) ;
@@ -461,11 +450,10 @@ module('Work Space Day with grouping by date', () => {
461450 intervalCount : 3 ,
462451 currentDate : new Date ( 2017 , 5 , 28 ) ,
463452 startDate : new Date ( 2017 , 5 , 21 ) ,
464- renovateRender : false ,
465453 } ) ;
466454
467- const firstCellData = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 0 ) . data ( 'dxCellData' ) ;
468- const secondCellData = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 143 ) . data ( 'dxCellData' ) ;
455+ const firstCellData = this . instance . getCellData ( this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 0 ) ) ;
456+ const secondCellData = this . instance . getCellData ( this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 143 ) ) ;
469457
470458 assert . deepEqual ( firstCellData . startDate , new Date ( 2017 , 5 , 27 , 0 ) , 'cell has right startDate' ) ;
471459 assert . deepEqual ( firstCellData . endDate , new Date ( 2017 , 5 , 27 , 0 , 30 ) , 'cell has right endtDate' ) ;
@@ -479,11 +467,10 @@ module('Work Space Day with grouping by date', () => {
479467 intervalCount : 3 ,
480468 currentDate : new Date ( 2017 , 5 , 25 ) ,
481469 startDate : new Date ( 2017 , 5 , 30 ) ,
482- renovateRender : false ,
483470 } ) ;
484471
485- const firstCellData = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 0 ) . data ( 'dxCellData' ) ;
486- const secondCellData = this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 143 ) . data ( 'dxCellData' ) ;
472+ const firstCellData = this . instance . getCellData ( this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 0 ) ) ;
473+ const secondCellData = this . instance . getCellData ( this . instance . $element ( ) . find ( '.dx-scheduler-date-table-cell' ) . eq ( 143 ) ) ;
487474
488475 assert . deepEqual ( firstCellData . startDate , new Date ( 2017 , 5 , 24 , 0 ) , 'cell has right startDate' ) ;
489476 assert . deepEqual ( firstCellData . endDate , new Date ( 2017 , 5 , 24 , 0 , 30 ) , 'cell has right endtDate' ) ;
0 commit comments