@@ -35,8 +35,7 @@ In this example, we will override the color and background for the first column
35
35
<file name="index.html">
36
36
<div ng-controller="MainCtrl">
37
37
<br>
38
- <br>
39
- <div id="grid1" ui-grid="gridOptions" class="grid"></div>
38
+ <div id="grid1" ui-grid="gridOptions" ng-if="gridOptions.data" class="grid"></div>
40
39
</div>
41
40
</file>
42
41
<file name="main.css">
@@ -49,21 +48,24 @@ In this example, we will override the color and background for the first column
49
48
</file>
50
49
<file name="scenario.js">
51
50
var gridTestUtils = require('../../test/e2e/gridTestUtils.spec.js');
51
+ var GridObjectTest = require('../../test/e2e/gridObjectTestUtils.spec.js');
52
+ var grid1 = new GridObjectTest('grid1');
53
+
52
54
describe( '111 cell class', function() {
53
55
// Reload the page before each test if on Firefox. Chrome does it automatically.
54
56
gridTestUtils.firefoxReload();
55
57
56
- it('grid should have two visible columns ', function () {
57
- gridTestUtils .expectHeaderColumnCount( 'grid1', 2 );
58
+ it('header values should be as expected ', function () {
59
+ grid1 .expectHeaderColumnCount( 2 );
58
60
});
59
61
60
62
it('column one formatted color red, background yellow', function () {
61
63
// sort by company, 2,1 is no longer Velity so shouldn't be blue, check it's the same colour as row 1
62
- gridTestUtils .clickHeaderCell( 'grid1', 1 )
64
+ grid1 .clickHeaderCell( 1 )
63
65
.then(function () {
64
- gridTestUtils .expectCellValueMatch( 'grid1', 2, 1, 'Acusage' );
65
- expect( gridTestUtils .dataCell( 'grid1', 1, 1 ).getCssValue('color')).toEqual('rgba(44, 62, 80, 1)');
66
- expect( gridTestUtils .dataCell( 'grid1', 2, 1 ).getCssValue('color')).toEqual('rgba(44, 62, 80, 1)');
66
+ grid1 .expectCellValueMatch( 2, 1, 'Acusage' );
67
+ expect( grid1 .dataCell( 1, 1 ).getCssValue('color')).toEqual('rgba(44, 62, 80, 1)');
68
+ expect( grid1 .dataCell( 2, 1 ).getCssValue('color')).toEqual('rgba(44, 62, 80, 1)');
67
69
});
68
70
});
69
71
});
0 commit comments