File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,12 @@ module.exports = (config) => {
6262 srcRecursivePath ,
6363 'node_modules/jasmine-jquery/lib/jasmine-jquery.js' ,
6464 'node_modules/powerbi-visuals-utils-testutils/lib/index.js' ,
65+ {
66+ pattern : './capabilities.json' ,
67+ watched : false ,
68+ served : true ,
69+ included : false
70+ } ,
6571 recursivePathToTests ,
6672 {
6773 pattern : srcOriginalRecursivePath ,
Original file line number Diff line number Diff line change @@ -741,6 +741,30 @@ module powerbi.extensibility.visual.test {
741741 } ) ;
742742 } ) ;
743743
744+ describe ( "Capabilities tests" , ( ) => {
745+ it ( "all items having displayName should have displayNameKey property" , ( ) => {
746+ jasmine . getJSONFixtures ( ) . fixturesPath = "base" ;
747+
748+ let jsonData = getJSONFixture ( "capabilities.json" ) ;
749+
750+ let objectsChecker : Function = ( obj ) => {
751+ for ( let property in obj ) {
752+ let value : any = obj [ property ] ;
753+
754+ if ( value . displayName ) {
755+ expect ( value . displayNameKey ) . toBeDefined ( ) ;
756+ }
757+
758+ if ( typeof value === "object" ) {
759+ objectsChecker ( value ) ;
760+ }
761+ }
762+ } ;
763+
764+ objectsChecker ( jsonData ) ;
765+ } ) ;
766+ } ) ;
767+
744768 describe ( "converter" , ( ) => {
745769 let colorPalette : IColorPalette ,
746770 visualHost : IVisualHost ;
You can’t perform that action at this time.
0 commit comments