@@ -25,7 +25,6 @@ describe('plot schema', function() {
2525 var isPlainObject = Lib . isPlainObject ;
2626
2727 var VALTYPES = Object . keys ( valObjects ) ;
28- var ROLES = [ 'info' , 'style' , 'data' ] ;
2928 var editType = plotSchema . defs . editType ;
3029
3130 function assertTraceSchema ( callback ) {
@@ -73,26 +72,6 @@ describe('plot schema', function() {
7372 ) ;
7473 } ) ;
7574
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-
9675 it ( 'all attributes should have the required options' , function ( ) {
9776 assertPlotSchema (
9877 function ( attr ) {
@@ -115,7 +94,7 @@ describe('plot schema', function() {
11594 var opts = valObject . requiredOpts
11695 . concat ( valObject . otherOpts )
11796 . concat ( [
118- 'valType' , 'description' , 'role' ,
97+ 'valType' , 'description' ,
11998 'editType' , 'impliedEdits' , 'anim' ,
12099 '_compareAsJSON' , '_noTemplating'
121100 ] ) ;
@@ -185,13 +164,8 @@ describe('plot schema', function() {
185164
186165 // N.B. the specs below must be satisfied for plotly.py
187166 expect ( isPlainObject ( itemsObj ) ) . toBe ( true ) ;
188- expect ( itemsObj . role ) . toBeUndefined ( ) ;
189167 expect ( Object . keys ( itemsObj ) . length ) . toEqual ( 1 ) ;
190168 expect ( isPlainObject ( itemObj ) ) . toBe ( true ) ;
191- expect ( itemObj . role ) . toBe ( 'object' ) ;
192-
193- var role = np . get ( ) . role ;
194- expect ( role ) . toEqual ( 'object' ) ;
195169 } ) ;
196170 } ) ;
197171
@@ -223,7 +197,7 @@ describe('plot schema', function() {
223197 ) ;
224198 } ) ;
225199
226- it ( 'deprecated attributes should have a `valType` and `role` ' , function ( ) {
200+ it ( 'deprecated attributes should have a `valType`' , function ( ) {
227201 var DEPRECATED = '_deprecated' ;
228202
229203 assertPlotSchema (
@@ -234,8 +208,6 @@ describe('plot schema', function() {
234208
235209 expect ( VALTYPES . indexOf ( dAttr . valType ) !== - 1 )
236210 . toBe ( true , attrString + ': ' + dAttrName ) ;
237- expect ( ROLES . indexOf ( dAttr . role ) !== - 1 )
238- . toBe ( true , attrString + ': ' + dAttrName ) ;
239211 } ) ;
240212 }
241213 }
@@ -317,15 +289,13 @@ describe('plot schema', function() {
317289 expect ( plotSchema . defs . metaKeys )
318290 . toEqual ( [
319291 '_isSubplotObj' , '_isLinkedToArray' , '_arrayAttrRegexps' ,
320- '_deprecated' , 'description' , 'role' , ' editType', 'impliedEdits'
292+ '_deprecated' , 'description' , 'editType' , 'impliedEdits'
321293 ] ) ;
322294 } ) ;
323295
324296 it ( 'should list the correct frame attributes' , function ( ) {
325297 expect ( plotSchema . frames ) . toBeDefined ( ) ;
326- expect ( plotSchema . frames . role ) . toEqual ( 'object' ) ;
327298 expect ( plotSchema . frames . items . frames_entry ) . toBeDefined ( ) ;
328- expect ( plotSchema . frames . items . frames_entry . role ) . toEqual ( 'object' ) ;
329299 } ) ;
330300
331301 it ( 'should list config attributes' , function ( ) {
@@ -469,7 +439,7 @@ describe('getTraceValObject', function() {
469439 // it still returns the attribute itself - but maybe we should only do this
470440 // for valType: any? (or data_array/arrayOk with just an index)
471441 [
472- 'valType' , 'dflt' , 'role' , ' description', 'arrayOk' ,
442+ 'valType' , 'dflt' , 'description' , 'arrayOk' ,
473443 'editType' , 'min' , 'max' , 'values'
474444 ] . forEach ( function ( prop ) {
475445 expect ( getTraceValObject ( { } , [ 'x' , prop ] ) )
0 commit comments