@@ -57,7 +57,7 @@ auto-selects the first row once the data is loaded.
57
57
58
58
<example module="app">
59
59
<file name="app.js">
60
- var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.selection']);
60
+ var app = angular.module('app', ['ngTouch', 'ui.grid', 'ui.grid.selection', 'ui.grid.cellNav', 'ngAria' ]);
61
61
62
62
app.controller('MainCtrl', ['$scope', '$http', '$log', '$timeout', 'uiGridConstants', function ($scope, $http, $log, $timeout, uiGridConstants) {
63
63
$scope.gridOptions = {
@@ -192,7 +192,7 @@ auto-selects the first row once the data is loaded.
192
192
<button type="button" class="btn btn-success" ng-click="toggleFullRowSelection()">Toggle full row selection</button>
193
193
<br/>
194
194
195
- <div ui-grid="gridOptions" ui-grid-selection class="grid"></div>
195
+ <div id="grid1Selection" ui-grid="gridOptions" ui-grid-selection ui-grid-cellnav class="grid"></div>
196
196
</div>
197
197
<div ng-controller="SecondCtrl">
198
198
Single selection grid without rowHeader, and allowing rowSelection to be toggled on and off dynamically:
@@ -207,4 +207,26 @@ auto-selects the first row once the data is loaded.
207
207
height: 400px;
208
208
}
209
209
</file>
210
+ <file name="scenario.js">
211
+ var gridTestUtils = require('../../test/e2e/gridTestUtils.spec.js');
212
+ var GridObjectTest = require('../../test/e2e/gridObjectTestUtils.spec.js');
213
+ var grid1Selection = new GridObjectTest('grid1Selection');
214
+
215
+ describe('210 tutorial', function() {
216
+ xit('should output aria text for cells that come from selection feature', function () {
217
+ pending('For unknown reasons causes next test suite to fail. It looks as if the page for the next test was not loaded before selectors/expects fire.')
218
+ var focuser = element(by.css('.ui-grid-focuser'));
219
+ grid1Selection.selectRow(1).then(function () {
220
+ return gridTestUtils.click(focuser);
221
+ })
222
+ .then(function () {
223
+ expect(element(by.css('.ui-grid-a11y-ariascreenreader-speakable.ui-grid-offscreen')).getInnerHtml()).toEqual('Row selected ');
224
+ return focuser.sendKeys(protractor.Key.ARROW_DOWN);
225
+ })
226
+ .then(function () {
227
+ expect(element(by.css('.ui-grid-a11y-ariascreenreader-speakable.ui-grid-offscreen')).getInnerHtml()).toEqual('Row not selected ');
228
+ })
229
+ });
230
+ });
231
+ </file>
210
232
</example>
0 commit comments