@@ -25,7 +25,6 @@ describe('plot schema', function() {
25
25
var isPlainObject = Lib . isPlainObject ;
26
26
27
27
var VALTYPES = Object . keys ( valObjects ) ;
28
- var ROLES = [ 'info' , 'style' , 'data' ] ;
29
28
var editType = plotSchema . defs . editType ;
30
29
31
30
function assertTraceSchema ( callback ) {
@@ -73,26 +72,6 @@ describe('plot schema', function() {
73
72
) ;
74
73
} ) ;
75
74
76
- it ( 'all attributes should only have valid `role`' , function ( ) {
77
- assertPlotSchema (
78
- function ( attr ) {
79
- if ( isValObject ( attr ) ) {
80
- expect ( ROLES . indexOf ( attr . role ) !== - 1 ) . toBe ( true , attr ) ;
81
- }
82
- }
83
- ) ;
84
- } ) ;
85
-
86
- it ( 'all nested objects should have the *object* `role`' , function ( ) {
87
- assertPlotSchema (
88
- function ( attr , attrName ) {
89
- if ( ! isValObject ( attr ) && isPlainObject ( attr ) && attrName !== 'items' ) {
90
- expect ( attr . role === 'object' ) . toBe ( true ) ;
91
- }
92
- }
93
- ) ;
94
- } ) ;
95
-
96
75
it ( 'all attributes should have the required options' , function ( ) {
97
76
assertPlotSchema (
98
77
function ( attr ) {
@@ -115,7 +94,7 @@ describe('plot schema', function() {
115
94
var opts = valObject . requiredOpts
116
95
. concat ( valObject . otherOpts )
117
96
. concat ( [
118
- 'valType' , 'description' , 'role' ,
97
+ 'valType' , 'description' ,
119
98
'editType' , 'impliedEdits' , 'anim' ,
120
99
'_compareAsJSON' , '_noTemplating'
121
100
] ) ;
@@ -185,13 +164,8 @@ describe('plot schema', function() {
185
164
186
165
// N.B. the specs below must be satisfied for plotly.py
187
166
expect ( isPlainObject ( itemsObj ) ) . toBe ( true ) ;
188
- expect ( itemsObj . role ) . toBeUndefined ( ) ;
189
167
expect ( Object . keys ( itemsObj ) . length ) . toEqual ( 1 ) ;
190
168
expect ( isPlainObject ( itemObj ) ) . toBe ( true ) ;
191
- expect ( itemObj . role ) . toBe ( 'object' ) ;
192
-
193
- var role = np . get ( ) . role ;
194
- expect ( role ) . toEqual ( 'object' ) ;
195
169
} ) ;
196
170
} ) ;
197
171
@@ -223,7 +197,7 @@ describe('plot schema', function() {
223
197
) ;
224
198
} ) ;
225
199
226
- it ( 'deprecated attributes should have a `valType` and `role` ' , function ( ) {
200
+ it ( 'deprecated attributes should have a `valType`' , function ( ) {
227
201
var DEPRECATED = '_deprecated' ;
228
202
229
203
assertPlotSchema (
@@ -234,8 +208,6 @@ describe('plot schema', function() {
234
208
235
209
expect ( VALTYPES . indexOf ( dAttr . valType ) !== - 1 )
236
210
. toBe ( true , attrString + ': ' + dAttrName ) ;
237
- expect ( ROLES . indexOf ( dAttr . role ) !== - 1 )
238
- . toBe ( true , attrString + ': ' + dAttrName ) ;
239
211
} ) ;
240
212
}
241
213
}
@@ -317,15 +289,13 @@ describe('plot schema', function() {
317
289
expect ( plotSchema . defs . metaKeys )
318
290
. toEqual ( [
319
291
'_isSubplotObj' , '_isLinkedToArray' , '_arrayAttrRegexps' ,
320
- '_deprecated' , 'description' , 'role' , ' editType', 'impliedEdits'
292
+ '_deprecated' , 'description' , 'editType' , 'impliedEdits'
321
293
] ) ;
322
294
} ) ;
323
295
324
296
it ( 'should list the correct frame attributes' , function ( ) {
325
297
expect ( plotSchema . frames ) . toBeDefined ( ) ;
326
- expect ( plotSchema . frames . role ) . toEqual ( 'object' ) ;
327
298
expect ( plotSchema . frames . items . frames_entry ) . toBeDefined ( ) ;
328
- expect ( plotSchema . frames . items . frames_entry . role ) . toEqual ( 'object' ) ;
329
299
} ) ;
330
300
331
301
it ( 'should list config attributes' , function ( ) {
@@ -469,7 +439,7 @@ describe('getTraceValObject', function() {
469
439
// it still returns the attribute itself - but maybe we should only do this
470
440
// for valType: any? (or data_array/arrayOk with just an index)
471
441
[
472
- 'valType' , 'dflt' , 'role' , ' description', 'arrayOk' ,
442
+ 'valType' , 'dflt' , 'description' , 'arrayOk' ,
473
443
'editType' , 'min' , 'max' , 'values'
474
444
] . forEach ( function ( prop ) {
475
445
expect ( getTraceValObject ( { } , [ 'x' , prop ] ) )
0 commit comments