@@ -34,8 +34,6 @@ const TIMELINE_DAY = { class: 'dxSchedulerTimelineDay', name: 'SchedulerTimeline
34
34
const TIMELINE_WEEK = { class : 'dxSchedulerTimelineWeek' , name : 'SchedulerTimelineWeek' } ;
35
35
const TIMELINE_MONTH = { class : 'dxSchedulerTimelineMonth' , name : 'SchedulerTimelineMonth' } ;
36
36
37
- const toSelector = cssClass => '.' + cssClass ;
38
-
39
37
const checkHeaderCells = function ( $element , assert , interval , groupCount , viewDuration ) {
40
38
interval = interval || 0.5 ;
41
39
viewDuration = viewDuration || 1 ;
@@ -1223,7 +1221,7 @@ QUnit.module('FirstGroupCell and LastGroupCell classes', () => {
1223
1221
QUnit . test ( `first-group-cell class should be assigned to correct cells in basic case in ${ view . name } ` , async function ( assert ) {
1224
1222
const instance = await this . createInstance ( view . class ) ;
1225
1223
1226
- instance . $element ( ) . find ( toSelector ( CELL_CLASS ) ) . each ( function ( ) {
1224
+ instance . $element ( ) . find ( `. ${ CELL_CLASS } ` ) . each ( function ( ) {
1227
1225
assert . ok ( $ ( this ) . hasClass ( FIRST_GROUP_CELL_CLASS ) , 'Date table cell has first-group class' ) ;
1228
1226
} ) ;
1229
1227
@@ -1241,7 +1239,7 @@ QUnit.module('FirstGroupCell and LastGroupCell classes', () => {
1241
1239
dataSource : [ { id : 1 , text : 'a' } , { id : 2 , text : 'b' } ]
1242
1240
} ] ) ;
1243
1241
1244
- instance . $element ( ) . find ( toSelector ( CELL_CLASS ) ) . each ( function ( index ) {
1242
+ instance . $element ( ) . find ( `. ${ CELL_CLASS } ` ) . each ( function ( index ) {
1245
1243
checkFirstGroupCell ( assert , this , index , columnCountInGroup , 'Date table' ) ;
1246
1244
} ) ;
1247
1245
@@ -1261,7 +1259,7 @@ QUnit.module('FirstGroupCell and LastGroupCell classes', () => {
1261
1259
dataSource : [ { id : 1 , text : 'a' } , { id : 2 , text : 'b' } ]
1262
1260
} ] ) ;
1263
1261
1264
- instance . $element ( ) . find ( toSelector ( CELL_CLASS ) ) . each ( function ( index ) {
1262
+ instance . $element ( ) . find ( `. ${ CELL_CLASS } ` ) . each ( function ( index ) {
1265
1263
checkFirstGroupCell ( assert , this , index , GROUP_COUNT , 'Date table' ) ;
1266
1264
} ) ;
1267
1265
@@ -1281,7 +1279,7 @@ QUnit.module('FirstGroupCell and LastGroupCell classes', () => {
1281
1279
dataSource : [ { id : 1 , text : 'a' } , { id : 2 , text : 'b' } ]
1282
1280
} ] ) ;
1283
1281
1284
- instance . $element ( ) . find ( toSelector ( CELL_CLASS ) ) . each ( function ( index ) {
1282
+ instance . $element ( ) . find ( `. ${ CELL_CLASS } ` ) . each ( function ( index ) {
1285
1283
if ( Math . floor ( index / columnCountInGroup ) % rowCountInGroup === 0 ) {
1286
1284
assert . ok ( $ ( this ) . hasClass ( FIRST_GROUP_CELL_CLASS ) , 'Date table cell has first-group class' ) ;
1287
1285
} else {
@@ -1297,7 +1295,7 @@ QUnit.module('FirstGroupCell and LastGroupCell classes', () => {
1297
1295
QUnit . test ( `last-group-cell class should be assigned to correct cells in basic case in ${ view . name } ` , async function ( assert ) {
1298
1296
const instance = await this . createInstance ( view . class ) ;
1299
1297
1300
- instance . $element ( ) . find ( toSelector ( CELL_CLASS ) ) . each ( function ( ) {
1298
+ instance . $element ( ) . find ( `. ${ CELL_CLASS } ` ) . each ( function ( ) {
1301
1299
assert . ok ( $ ( this ) . hasClass ( LAST_GROUP_CELL_CLASS ) , 'Date table cell has last-group class' ) ;
1302
1300
} ) ;
1303
1301
@@ -1315,7 +1313,7 @@ QUnit.module('FirstGroupCell and LastGroupCell classes', () => {
1315
1313
dataSource : [ { id : 1 , text : 'a' } , { id : 2 , text : 'b' } ]
1316
1314
} ] ) ;
1317
1315
1318
- instance . $element ( ) . find ( toSelector ( CELL_CLASS ) ) . each ( function ( index ) {
1316
+ instance . $element ( ) . find ( `. ${ CELL_CLASS } ` ) . each ( function ( index ) {
1319
1317
checkLastGroupCell ( assert , this , index , columnCountInGroup , 'Date table' ) ;
1320
1318
} ) ;
1321
1319
@@ -1335,7 +1333,7 @@ QUnit.module('FirstGroupCell and LastGroupCell classes', () => {
1335
1333
dataSource : [ { id : 1 , text : 'a' } , { id : 2 , text : 'b' } ]
1336
1334
} ] ) ;
1337
1335
1338
- instance . $element ( ) . find ( toSelector ( CELL_CLASS ) ) . each ( function ( index ) {
1336
+ instance . $element ( ) . find ( `. ${ CELL_CLASS } ` ) . each ( function ( index ) {
1339
1337
checkLastGroupCell ( assert , this , index , GROUP_COUNT , 'Date table' ) ;
1340
1338
} ) ;
1341
1339
@@ -1355,7 +1353,7 @@ QUnit.module('FirstGroupCell and LastGroupCell classes', () => {
1355
1353
dataSource : [ { id : 1 , text : 'a' } , { id : 2 , text : 'b' } ]
1356
1354
} ] ) ;
1357
1355
1358
- instance . $element ( ) . find ( toSelector ( CELL_CLASS ) ) . each ( function ( index ) {
1356
+ instance . $element ( ) . find ( `. ${ CELL_CLASS } ` ) . each ( function ( index ) {
1359
1357
if ( ( Math . floor ( index / columnCountInGroup ) + 1 ) % rowCountInGroup === 0 ) {
1360
1358
assert . ok ( $ ( this ) . hasClass ( LAST_GROUP_CELL_CLASS ) , 'Date table cell has last-group class' ) ;
1361
1359
} else {
0 commit comments