@@ -14,6 +14,8 @@ let table = new TablePage({
14
14
body : {
15
15
rows : collection ( {
16
16
isCustomRow : hasClass ( 'custom-row' ) ,
17
+ isEven : hasClass ( 'is-even' ) ,
18
+ isOdd : hasClass ( 'is-odd' ) ,
17
19
} ) ,
18
20
} ,
19
21
} ) ;
@@ -34,6 +36,17 @@ const USE_EMBER_ARRAY_PARAMETERS = {
34
36
35
37
module ( 'Integration | row' , function ( ) {
36
38
parameterizedComponentModule ( 'basic' , USE_EMBER_ARRAY_PARAMETERS , function ( ) {
39
+ test ( 'marks rows as even or odd' , async function ( assert ) {
40
+ await generateTable ( this ) ;
41
+
42
+ assert . true ( table . rows . objectAt ( 0 ) . isEven , 'First row is even' ) ;
43
+ assert . true ( table . rows . objectAt ( 1 ) . isOdd , 'Second row is odd' ) ;
44
+ assert . true ( table . rows . objectAt ( 2 ) . isEven , 'Third row is even' ) ;
45
+ assert . true ( table . rows . objectAt ( 3 ) . isOdd , 'Fourth row is odd' ) ;
46
+ assert . true ( table . rows . objectAt ( 4 ) . isEven , 'Fifth row is even' ) ;
47
+ assert . true ( table . rows . objectAt ( 5 ) . isOdd , 'Sixth row is odd' ) ;
48
+ } ) ;
49
+
37
50
test ( 'can use a custom row component' , async function ( assert ) {
38
51
await generateTable ( this , {
39
52
rowComponent : 'custom-row' ,
0 commit comments