@@ -131,25 +131,41 @@ describe("Ignite directives", function() {
131131 expect ( dataChartElement . length ) . toBe ( 1 ) ;
132132 expect ( dataChartElement . data ( "igDataChart" ) ) . not . toBeUndefined ( ) ;
133133 } ) ) ;
134-
134+
135135 it ( "should create hierarchical grid" , inject ( function ( $compile , $rootScope ) {
136- var hierarchicalGridTpl = '<ig-hierarchical-grid id="hgrid1" data-source="northwindEmployees" width="100%" height="400px" auto-commit="true" auto-generate-columns="false" auto-generate-layouts="false">' +
137- '<columns> <column key="FirstName" header-text="First Name" width="25%" data-type="string"></column>' +
136+ var hierarchicalGridTpl =
137+ '<ig-hierarchical-grid id="hgrid1" data-source="data" width="100%" height="400px" auto-commit="true" auto-generate-columns="false" auto-generate-layouts="false">' +
138+ '<columns>' +
139+ '<column key="FirstName" header-text="First Name" width="25%" data-type="string"></column>' +
138140 '<column key="LastName" header-text="Last Name" width="25%" data-type="string"></column>' +
139141 '<column key="Title" header-text="Title" width="25%" data-type="string"></column>' +
140- '<column key="BirthDate" header-text="Birth Date" width="25%" data-type="date"></column></columns>' +
141- '<column-layouts><column-layout key="Orders" response-data-key="results" primary-key="OrderID" auto-generate-columns="false" width="100%">' +
142- '<columns><column key="OrderID" header-text="OrderID" width="25%" data-type="string"></column>' +
143- '<column key="Freight" header-text="Freight" width="25%" data-type="string"></column>' +
144- '<column key="ShipName" header-text="ShipName" width="25%" data-type="string"></column>' +
145- '<column key="ShipAddress" header-text="ShipAddress" width="25%" data-type="string"></column></columns>' +
146- '<features><feature name="Paging" page-size="10"></feature></features></column-layout></column-layouts>ig-hierarchical-grid>' ;
142+ '<column key="BirthDate" header-text="Birth Date" width="25%" data-type="date"></column>' +
143+ '</columns>' +
144+ '<features>' +
145+ '<feature name="Selection" mode="row"></feature>' +
146+ '</features>' +
147+ '<column-layouts>' +
148+ '<column-layout key="Orders" response-data-key="results" primary-key="OrderID" auto-generate-columns="false" width="100%">' +
149+ '<columns>' +
150+ '<column key="OrderID" header-text="OrderID" width="25%" data-type="string"></column>' +
151+ '<column key="Freight" header-text="Freight" width="25%" data-type="string"></column>' +
152+ '<column key="ShipName" header-text="ShipName" width="25%" data-type="string"></column>' +
153+ '<column key="ShipAddress" header-text="ShipAddress" width="25%" data-type="string"></column>' +
154+ '</columns>' +
155+ '<features>' +
156+ '<feature name="Paging" page-size="10"></feature>' +
157+ '</features>' +
158+ '</column-layout>' +
159+ '</column-layouts>' +
160+ '</ig-hierarchical-grid>' ;
161+
147162 var hierarchicalGrid = angular . element ( '<div ng-app="my-app"><div ng-controller="NorthwindCtrl">' + hierarchicalGridTpl + '</div>' ) ;
148163 var scope = $rootScope . $new ( ) ;
149164 $compile ( hierarchicalGrid ) ( scope ) ;
150165 scope . $digest ( ) ;
151166 var hGridElement = hierarchicalGrid . find ( "#hgrid1" ) ;
152167 expect ( hGridElement . length ) . toBe ( 1 ) ;
153168 expect ( hGridElement . data ( "igHierarchicalGrid" ) ) . not . toBeUndefined ( ) ;
169+ expect ( hGridElement . data ( "igGridSelection" ) ) . not . toBeUndefined ( ) ;
154170 } ) ) ;
155171} ) ;
0 commit comments