Skip to content

Commit 1adfae4

Browse files
committed
Merge pull request #3630 from PaulL1/treebase
Treebase
2 parents 57f556d + 53cfccc commit 1adfae4

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

misc/tutorial/103_filtering.ngdoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ Refer {@link 321_singleFilter singleFilter tutorial}, it is possible to implemen
139139
{ field: 'age', filters: [
140140
{
141141
condition: uiGridConstants.filter.GREATER_THAN,
142-
placeholder: 'greater than',
143-
term: 30
142+
placeholder: 'greater than'
144143
},
145144
{
146145
condition: uiGridConstants.filter.LESS_THAN,
@@ -206,14 +205,14 @@ Refer {@link 321_singleFilter singleFilter tutorial}, it is possible to implemen
206205
width: 650px;
207206
height: 400px;
208207
}
209-
208+
210209
.header-filtered {
211210
color: blue;
212211
}
213212
</file>
214213
<file name="scenario.js">
215214
var gridTestUtils = require('../../test/e2e/gridTestUtils.spec.js');
216-
215+
217216
describe('first grid on the page, filtered by male by default', function() {
218217
it('grid should have seven visible columns', function () {
219218
gridTestUtils.expectHeaderColumnCount( 'grid1', 7 );
@@ -232,15 +231,17 @@ Refer {@link 321_singleFilter singleFilter tutorial}, it is possible to implemen
232231
it('third row should be Hatfield Hudson - will be Terry Clay if filtering broken', function () {
233232
gridTestUtils.expectCellValueMatch( 'grid1', 2, 0, 'Hatfield Hudson' );
234233
});
235-
236-
it('cancel filter on gender column, should now see Bishop Carr in third row', function() {
237-
gridTestUtils.cancelFilterInColumn( 'grid1', 1 );
234+
235+
it('cancel filter on gender column and on date column, should now see Bishop Carr in third row', function() {
236+
gridTestUtils.cancelFilterInColumn( 'grid1', 1 );
237+
gridTestUtils.cancelFilterInColumn( 'grid1', 6 );
238238
gridTestUtils.expectCellValueMatch( 'grid1', 2, 0, 'Bishop Carr' );
239239
});
240240

241241
it('filter on email column, should automatically do "ends with"', function() {
242-
gridTestUtils.cancelFilterInColumn( 'grid1', 1 );
243-
gridTestUtils.enterFilterInColumn( 'grid1', 3, 'digirang.com' );
242+
gridTestUtils.cancelFilterInColumn( 'grid1', 1 );
243+
gridTestUtils.cancelFilterInColumn( 'grid1', 6 );
244+
gridTestUtils.enterFilterInColumn( 'grid1', 3, 'digirang.com' );
244245
gridTestUtils.expectRowCount( 'grid1', 2 );
245246
});
246247
});

misc/tutorial/401_AllFeatures.ngdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ All features are enabled to get an idea of performance
109109
it('should not duplicate the menu options for pinning when resizing a column', function () {
110110
element( by.id('refreshButton') ).click();
111111
gridTestUtils.resizeHeaderCell( 'grid1', 1 );
112-
gridTestUtils.expectVisibleColumnMenuItems( 'grid1', 1, 5);
112+
gridTestUtils.expectVisibleColumnMenuItems( 'grid1', 1, 11);
113113
});
114114
});
115115
</file>

src/js/core/directives/ui-grid-menu-button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ angular.module('ui.grid')
7878
/**
7979
* @ngdoc function
8080
* @name addToGridMenu
81-
* @propertyOf ui.grid.class:GridOptions
81+
* @propertyOf ui.grid.gridMenuService
8282
* @description add items to the grid menu. Used by features
8383
* to add their menu items if they are enabled, can also be used by
8484
* end users to add menu items. This method has the advantage of allowing
@@ -108,7 +108,7 @@ angular.module('ui.grid')
108108
/**
109109
* @ngdoc function
110110
* @name removeFromGridMenu
111-
* @methodOf ui.grid.core.api:PublicApi
111+
* @methodOf ui.grid.gridMenuService
112112
* @description Remove an item from the grid menu based on a provided id. Assumes
113113
* that the id is unique, removes only the last instance of that id. Does nothing if
114114
* the specified id is not found. If there is no gridMenuScope or registeredMenuItems

src/templates/ui-grid/ui-grid-footer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="ui-grid-footer-canvas">
44
<div class="ui-grid-footer-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()">
55
<div class="ui-grid-footer-cell-row">
6-
<div ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" ui-grid-footer-cell col="col" render-index="$index" class="ui-grid-footer-cell ui-grid-clearfix"></div>
6+
<div ng-repeat="col in colContainer.renderedColumns track by col.uid" ui-grid-footer-cell col="col" render-index="$index" class="ui-grid-footer-cell ui-grid-clearfix"></div>
77
</div>
88
</div>
99
</div>

test/e2e/gridTestUtils.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ module.exports = {
112112
*
113113
*/
114114
expectHeaderColumnCount: function( gridId, expectedNumCols ) {
115-
var headerCols = this.getGrid( gridId ).element( by.css('.ui-grid-render-container-body')).element( by.css('.ui-grid-header') ).all( by.repeater('col in colContainer.renderedColumns track by col.colDef.name') );
115+
var headerCols = this.getGrid( gridId ).element( by.css('.ui-grid-render-container-body')).element( by.css('.ui-grid-header') ).all( by.repeater('col in colContainer.renderedColumns track by col.uid') );
116116
expect(headerCols.count()).toEqual(expectedNumCols);
117117
},
118118

@@ -132,7 +132,7 @@ module.exports = {
132132
*
133133
*/
134134
expectHeaderLeftColumnCount: function( gridId, expectedNumCols ) {
135-
var headerCols = this.getGrid( gridId ).element( by.css('.ui-grid-render-container-left')).element( by.css('.ui-grid-header') ).all( by.repeater('col in colContainer.renderedColumns track by col.colDef.name') );
135+
var headerCols = this.getGrid( gridId ).element( by.css('.ui-grid-render-container-left')).element( by.css('.ui-grid-header') ).all( by.repeater('col in colContainer.renderedColumns track by col.uid') );
136136
expect(headerCols.count()).toEqual(expectedNumCols);
137137
},
138138

@@ -152,7 +152,7 @@ module.exports = {
152152
*
153153
*/
154154
expectFooterColumnCount: function( gridId, expectedNumCols ) {
155-
var footerCols = this.getGrid( gridId ).element( by.css('.ui-grid-footer') ).all( by.repeater('col in colContainer.renderedColumns track by col.colDef.name') );
155+
var footerCols = this.getGrid( gridId ).element( by.css('.ui-grid-footer') ).all( by.repeater('col in colContainer.renderedColumns track by col.uid') );
156156
expect(footerCols.count()).toEqual(expectedNumCols);
157157
},
158158

@@ -173,7 +173,7 @@ module.exports = {
173173
*
174174
*/
175175
headerCell: function( gridId, expectedCol, expectedValue ) {
176-
return this.getGrid( gridId ).element( by.css('.ui-grid-render-container-body')).element( by.css('.ui-grid-header') ).element( by.repeater('col in colContainer.renderedColumns track by col.colDef.name').row( expectedCol) );
176+
return this.getGrid( gridId ).element( by.css('.ui-grid-render-container-body')).element( by.css('.ui-grid-header') ).element( by.repeater('col in colContainer.renderedColumns track by col.uid').row( expectedCol) );
177177
},
178178

179179
/**
@@ -193,7 +193,7 @@ module.exports = {
193193
*
194194
*/
195195
footerCell: function( gridId, expectedCol, expectedValue ) {
196-
return this.getGrid( gridId ).element( by.css('.ui-grid-footer') ).element( by.repeater('col in colContainer.renderedColumns track by col.colDef.name').row( expectedCol) );
196+
return this.getGrid( gridId ).element( by.css('.ui-grid-footer') ).element( by.repeater('col in colContainer.renderedColumns track by col.uid').row( expectedCol) );
197197
},
198198

199199
/**
@@ -217,7 +217,7 @@ module.exports = {
217217
*/
218218
dataCell: function( gridId, fetchRow, fetchCol ) {
219219
var row = this.getGrid( gridId ).element( by.css('.ui-grid-render-container-body')).element( by.repeater('(rowRenderIndex, row) in rowContainer.renderedRows track by $index').row( fetchRow ) );
220-
return row.element( by.repeater('(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name').row( fetchCol ));
220+
return row.element( by.repeater('(colRenderIndex, col) in colContainer.renderedColumns track by col.uid').row( fetchCol ));
221221
},
222222

223223
/**
@@ -309,7 +309,7 @@ module.exports = {
309309
var row = this.getRow( gridId, expectedRow );
310310

311311
for ( var i = 0; i < expectedValueArray.length; i++){
312-
expect(row.element( by.repeater('(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name').row(i)).getText()).toMatch(expectedValueArray[i], 'Expected to match: ' + expectedValueArray[i] + ' in column: ' + i);
312+
expect(row.element( by.repeater('(colRenderIndex, col) in colContainer.renderedColumns track by col.uid').row(i)).getText()).toMatch(expectedValueArray[i], 'Expected to match: ' + expectedValueArray[i] + ' in column: ' + i);
313313
}
314314
},
315315

0 commit comments

Comments
 (0)