File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed
packages/cli/templates/react Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class GridTemplate extends IgniteUIForReactTemplate {
1616 this . controlGroup = "Data Grids" ;
1717 // TODO: read version from igniteui-react-core in package.json
1818 this . packages = [ "igniteui-react-grids@~16.15.0" , "igniteui-react-inputs@~16.15.0" ,
19- "igniteui-react-layouts@~16.15.0" ] ;
19+ "igniteui-react-layouts@~16.15.0" , "igniteui-react-core@~16.15.0" ] ;
2020
2121 this . hasExtraConfiguration = false ;
2222 }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class GridTemplate extends IgniteUIForReactTemplate {
1515 this . components = [ "Grid" ] ;
1616 this . controlGroup = "Data Grids" ;
1717 this . packages = [ "igniteui-react-grids@~19.0.2" , "igniteui-react-inputs@~19.0.0" ,
18- "igniteui-react-layouts@~19.0.0" , "igniteui-react@~19.0.3" ] ;
18+ "igniteui-react-layouts@~19.0.0" , "igniteui-react@~19.0.3" , "igniteui-react-core@~19.0.0" ] ;
1919
2020 this . hasExtraConfiguration = false ;
2121 }
Original file line number Diff line number Diff line change @@ -27,4 +27,25 @@ describe("React templates", () => {
2727 }
2828 }
2929 } ) ;
30+
31+ it ( "Grid templates should include igniteui-react-core dependency" , async ( ) => {
32+ const reactFramework : Framework = require ( templatesLocation ) ;
33+
34+ // Check all project libraries
35+ for ( const projLibrary of reactFramework . projectLibraries ) {
36+ // Find grid templates
37+ const gridTemplates = projLibrary . templates . filter ( template =>
38+ template . id === "grid" && template . packages &&
39+ template . packages . some ( pkg => pkg . includes ( "igniteui-react-grids" ) )
40+ ) ;
41+
42+ // Verify each grid template includes igniteui-react-core
43+ for ( const gridTemplate of gridTemplates ) {
44+ const hasReactCore = gridTemplate . packages . some ( pkg => pkg . includes ( "igniteui-react-core" ) ) ;
45+ expect ( hasReactCore ) . toBeTruthy (
46+ `Grid template ${ gridTemplate . id } in project type ${ gridTemplate . projectType } should include igniteui-react-core dependency`
47+ ) ;
48+ }
49+ }
50+ } ) ;
3051} ) ;
You can’t perform that action at this time.
0 commit comments