@@ -59,15 +59,19 @@ describe('Timeline PointItem', function () {
59
59
assert ( pointItem . isVisible ( range ) ) ;
60
60
} ) ;
61
61
62
- it ( 'should redraw() and then not be dirty' , function ( ) {
62
+
63
+ describe ( 'should redraw() and then' , function ( ) {
64
+
65
+ it ( 'not be dirty' , function ( ) {
63
66
var pointItem = new PointItem ( { start : now . toDate ( ) } , null , { editable : false } ) ;
64
67
pointItem . setParent ( TestSupport . buildMockItemSet ( ) ) ;
65
68
assert ( pointItem . dirty ) ;
66
69
pointItem . redraw ( ) ;
67
70
assert ( ! pointItem . dirty ) ;
68
71
} ) ;
69
72
70
- it ( 'should redraw() and then have point attached to its parent' , function ( ) {
73
+
74
+ it ( 'have point attached to its parent' , function ( ) {
71
75
var pointItem = new PointItem ( { start : now . toDate ( ) } , null , { editable : false } ) ;
72
76
var parent = TestSupport . buildMockItemSet ( ) ;
73
77
pointItem . setParent ( parent ) ;
@@ -76,7 +80,10 @@ describe('Timeline PointItem', function () {
76
80
assert ( parent . dom . foreground . hasChildNodes ( ) ) ;
77
81
} ) ;
78
82
79
- it ( 'should redraw() and then have the correct classname for a non-editable item' , function ( ) {
83
+
84
+ describe ( 'have the correct classname for' , function ( ) {
85
+
86
+ it ( 'a non-editable item' , function ( ) {
80
87
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : false } , null , { editable : false } ) ;
81
88
var parent = TestSupport . buildMockItemSet ( ) ;
82
89
pointItem . setParent ( parent ) ;
@@ -85,7 +92,7 @@ describe('Timeline PointItem', function () {
85
92
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-readonly" ) ;
86
93
} ) ;
87
94
88
- it ( 'should redraw() and then have the correct classname for an editable item (with object option)' , function ( ) {
95
+ it ( 'an editable item (with object option)' , function ( ) {
89
96
var pointItem = new PointItem ( { start : now . toDate ( ) } , null , { editable : { updateTime : true , updateGroup : false } } ) ;
90
97
var parent = TestSupport . buildMockItemSet ( ) ;
91
98
pointItem . setParent ( parent ) ;
@@ -94,7 +101,7 @@ describe('Timeline PointItem', function () {
94
101
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-editable" ) ;
95
102
} ) ;
96
103
97
- it ( 'should redraw() and then have the correct classname for an editable item (with boolean option)' , function ( ) {
104
+ it ( 'an editable item (with boolean option)' , function ( ) {
98
105
var pointItem = new PointItem ( { start : now . toDate ( ) } , null , { editable : true } ) ;
99
106
var parent = TestSupport . buildMockItemSet ( ) ;
100
107
pointItem . setParent ( parent ) ;
@@ -103,7 +110,7 @@ describe('Timeline PointItem', function () {
103
110
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-editable" ) ;
104
111
} ) ;
105
112
106
- it ( 'should redraw() and then have the correct classname for an editable:false override item (with boolean option)' , function ( ) {
113
+ it ( 'an editable:false override item (with boolean option)' , function ( ) {
107
114
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : false } , null , { editable : true } ) ;
108
115
var parent = TestSupport . buildMockItemSet ( ) ;
109
116
pointItem . setParent ( parent ) ;
@@ -112,7 +119,7 @@ describe('Timeline PointItem', function () {
112
119
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-readonly" ) ;
113
120
} ) ;
114
121
115
- it ( 'should redraw() and then have the correct classname for an editable:true override item (with boolean option)' , function ( ) {
122
+ it ( 'an editable:true override item (with boolean option)' , function ( ) {
116
123
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : true } , null , { editable : false } ) ;
117
124
var parent = TestSupport . buildMockItemSet ( ) ;
118
125
pointItem . setParent ( parent ) ;
@@ -121,7 +128,7 @@ describe('Timeline PointItem', function () {
121
128
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-editable" ) ;
122
129
} ) ;
123
130
124
- it ( 'should redraw() and then have the correct classname for an editable:false override item (with object option)' , function ( ) {
131
+ it ( 'an editable:false override item (with object option)' , function ( ) {
125
132
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : false } , null , { editable : { updateTime : true , updateGroup : false } } ) ;
126
133
var parent = TestSupport . buildMockItemSet ( ) ;
127
134
pointItem . setParent ( parent ) ;
@@ -130,7 +137,7 @@ describe('Timeline PointItem', function () {
130
137
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-readonly" ) ;
131
138
} ) ;
132
139
133
- it ( 'should redraw() and then have the correct classname for an editable:false override item (with object option for group change)' , function ( ) {
140
+ it ( 'an editable:false override item (with object option for group change)' , function ( ) {
134
141
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : false } , null , { editable : { updateTime : false , updateGroup : true } } ) ;
135
142
var parent = TestSupport . buildMockItemSet ( ) ;
136
143
pointItem . setParent ( parent ) ;
@@ -139,7 +146,7 @@ describe('Timeline PointItem', function () {
139
146
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-readonly" ) ;
140
147
} ) ;
141
148
142
- it ( 'should redraw() and then have the correct classname for an editable:true override item (with object option)' , function ( ) {
149
+ it ( 'an editable:true override item (with object option)' , function ( ) {
143
150
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : true } , null , { editable : { updateTime : false , updateGroup : false } } ) ;
144
151
var parent = TestSupport . buildMockItemSet ( ) ;
145
152
pointItem . setParent ( parent ) ;
@@ -148,7 +155,7 @@ describe('Timeline PointItem', function () {
148
155
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-editable" ) ;
149
156
} ) ;
150
157
151
- it ( 'should redraw() and then have the correct classname for an editable:true non-override item (with object option)' , function ( ) {
158
+ it ( 'an editable:true non-override item (with object option)' , function ( ) {
152
159
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : true } , null , { editable : { updateTime : false , updateGroup : false , overrideItems : true } } ) ;
153
160
var parent = TestSupport . buildMockItemSet ( ) ;
154
161
pointItem . setParent ( parent ) ;
@@ -157,7 +164,7 @@ describe('Timeline PointItem', function () {
157
164
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-readonly" ) ;
158
165
} ) ;
159
166
160
- it ( 'should redraw() and then have the correct classname for an editable:false non-override item (with object option)' , function ( ) {
167
+ it ( 'an editable:false non-override item (with object option)' , function ( ) {
161
168
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : false } , null , { editable : { updateTime : true , updateGroup : false , overrideItems : true } } ) ;
162
169
var parent = TestSupport . buildMockItemSet ( ) ;
163
170
pointItem . setParent ( parent ) ;
@@ -166,7 +173,7 @@ describe('Timeline PointItem', function () {
166
173
assert . equal ( pointItem . dom . point . className , "vis-item vis-point vis-editable" ) ;
167
174
} ) ;
168
175
169
- it ( 'should redraw() and then have the correct property for an editable: {updateTime} override item (with boolean option)' , function ( ) {
176
+ it ( 'an editable: {updateTime} override item (with boolean option)' , function ( ) {
170
177
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { updateTime : true } } , null , { editable : true } ) ;
171
178
var parent = TestSupport . buildMockItemSet ( ) ;
172
179
pointItem . setParent ( parent ) ;
@@ -176,7 +183,7 @@ describe('Timeline PointItem', function () {
176
183
assert . equal ( pointItem . editable . remove , undefined ) ;
177
184
} ) ;
178
185
179
- it ( 'should redraw() and then have the correct property for an editable: {updateTime} override item (with boolean option false)' , function ( ) {
186
+ it ( 'an editable: {updateTime} override item (with boolean option false)' , function ( ) {
180
187
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { updateTime : true } } , null , { editable : false } ) ;
181
188
var parent = TestSupport . buildMockItemSet ( ) ;
182
189
pointItem . setParent ( parent ) ;
@@ -186,7 +193,7 @@ describe('Timeline PointItem', function () {
186
193
assert . equal ( pointItem . editable . remove , undefined ) ;
187
194
} ) ;
188
195
189
- it ( 'should redraw() and then have the correct property for an editable: {updateGroup} override item (with boolean option)' , function ( ) {
196
+ it ( 'an editable: {updateGroup} override item (with boolean option)' , function ( ) {
190
197
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { updateGroup : true } } , null , { editable : true } ) ;
191
198
var parent = TestSupport . buildMockItemSet ( ) ;
192
199
pointItem . setParent ( parent ) ;
@@ -196,7 +203,12 @@ describe('Timeline PointItem', function () {
196
203
assert . equal ( pointItem . editable . remove , undefined ) ;
197
204
} ) ;
198
205
199
- it ( 'should redraw() and then have the correct property for an editable: {updateGroup} override item (with boolean option false)' , function ( ) {
206
+ } ) ; // have the correct classname for
207
+
208
+
209
+ describe ( 'have the correct property for' , function ( ) {
210
+
211
+ it ( 'an editable: {updateGroup} override item (with boolean option false)' , function ( ) {
200
212
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { updateGroup : true } } , null , { editable : false } ) ;
201
213
var parent = TestSupport . buildMockItemSet ( ) ;
202
214
pointItem . setParent ( parent ) ;
@@ -206,7 +218,7 @@ describe('Timeline PointItem', function () {
206
218
assert . equal ( pointItem . editable . remove , undefined ) ;
207
219
} ) ;
208
220
209
- it ( 'should redraw() and then have the correct property for an editable: {remove} override item (with boolean option)' , function ( ) {
221
+ it ( 'an editable: {remove} override item (with boolean option)' , function ( ) {
210
222
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { remove : true } } , null , { editable : true } ) ;
211
223
var parent = TestSupport . buildMockItemSet ( ) ;
212
224
pointItem . setParent ( parent ) ;
@@ -216,7 +228,7 @@ describe('Timeline PointItem', function () {
216
228
assert . equal ( pointItem . editable . remove , true ) ;
217
229
} ) ;
218
230
219
- it ( 'should redraw() and then have the correct property for an editable: {remove} override item (with boolean option false)' , function ( ) {
231
+ it ( 'an editable: {remove} override item (with boolean option false)' , function ( ) {
220
232
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { remove : true } } , null , { editable : false } ) ;
221
233
var parent = TestSupport . buildMockItemSet ( ) ;
222
234
pointItem . setParent ( parent ) ;
@@ -226,7 +238,7 @@ describe('Timeline PointItem', function () {
226
238
assert . equal ( pointItem . editable . remove , true ) ;
227
239
} ) ;
228
240
229
- it ( 'should redraw() and then have the correct property for an editable: {updateTime, remove} override item (with boolean option)' , function ( ) {
241
+ it ( 'an editable: {updateTime, remove} override item (with boolean option)' , function ( ) {
230
242
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { updateTime : true , remove : true } } , null , { editable : true } ) ;
231
243
var parent = TestSupport . buildMockItemSet ( ) ;
232
244
pointItem . setParent ( parent ) ;
@@ -236,7 +248,7 @@ describe('Timeline PointItem', function () {
236
248
assert . equal ( pointItem . editable . remove , true ) ;
237
249
} ) ;
238
250
239
- it ( 'should redraw() and then have the correct property for an editable: {updateTime, remove} override item (with boolean option false)' , function ( ) {
251
+ it ( 'an editable: {updateTime, remove} override item (with boolean option false)' , function ( ) {
240
252
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { updateTime : true , remove : true } } , null , { editable : false } ) ;
241
253
var parent = TestSupport . buildMockItemSet ( ) ;
242
254
pointItem . setParent ( parent ) ;
@@ -246,7 +258,7 @@ describe('Timeline PointItem', function () {
246
258
assert . equal ( pointItem . editable . remove , true ) ;
247
259
} ) ;
248
260
249
- it ( 'should redraw() and then have the correct property for an editable: {updateTime, updateGroup, remove} override item (with boolean option)' , function ( ) {
261
+ it ( 'an editable: {updateTime, updateGroup, remove} override item (with boolean option)' , function ( ) {
250
262
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { updateTime : true , updateGroup : true , remove : true } } , null , { editable : true } ) ;
251
263
var parent = TestSupport . buildMockItemSet ( ) ;
252
264
pointItem . setParent ( parent ) ;
@@ -256,7 +268,7 @@ describe('Timeline PointItem', function () {
256
268
assert . equal ( pointItem . editable . remove , true ) ;
257
269
} ) ;
258
270
259
- it ( 'should redraw() and then have the correct property for an editable: {updateTime, updateGroup, remove} override item (with boolean option false)' , function ( ) {
271
+ it ( 'an editable: {updateTime, updateGroup, remove} override item (with boolean option false)' , function ( ) {
260
272
var pointItem = new PointItem ( { start : now . toDate ( ) , editable : { updateTime : true , updateGroup : true , remove : true } } , null , { editable : false } ) ;
261
273
var parent = TestSupport . buildMockItemSet ( ) ;
262
274
pointItem . setParent ( parent ) ;
@@ -265,4 +277,7 @@ describe('Timeline PointItem', function () {
265
277
assert . equal ( pointItem . editable . updateGroup , true ) ;
266
278
assert . equal ( pointItem . editable . remove , true ) ;
267
279
} ) ;
268
- } ) ;
280
+
281
+ } ) ; // have the correct property for
282
+ } ) ; // should redraw() and then
283
+ } ) ; // Timeline PointItem
0 commit comments