Debian Codegraph @

old-tests/tests_onhold/1_dom/gh125 - stripe stripping.js

raw symbols SCIP
1 // DATA_TEMPLATE: dom_data
2 oTest.fnStart( "Odd and even are stripped from all rows" );
3
4 $(document).ready( function () {
5 $('table tbody tr').addClass( 'odd even' );
6 $('table.display').dataTable();
7
8 oTest.fnTest(
9 "Odd is applied to exactly 5 rows",
10 null,
11 function () {
12 return $('#example tbody tr.odd').length === 5;
13 }
14 );
15
16 oTest.fnTest(
17 "Even is applied to exactly 5 rows",
18 null,
19 function () {
20 return $('#example tbody tr.even').length === 5;
21 }
22 );
23
24 oTest.fnTest(
25 "First row is odd",
26 null,
27 function () {
28 return $('#example tbody tr:eq(0)').hasClass('odd') &&
29 ! $('#example tbody tr:eq(0)').hasClass('even');
30 }
31 );
32
33 oTest.fnTest(
34 "Second row is even",
35 null,
36 function () {
37 return $('#example tbody tr:eq(1)').hasClass('even') &&
38 ! $('#example tbody tr:eq(1)').hasClass('odd');
39 }
40 );
41
42 oTest.fnTest(
43 "Third row is odd",
44 null,
45 function () {
46 return $('#example tbody tr:eq(2)').hasClass('odd') &&
47 ! $('#example tbody tr:eq(2)').hasClass('even');
48 }
49 );
50
51 oTest.fnTest(
52 "Fourth row is even",
53 null,
54 function () {
55 return $('#example tbody tr:eq(3)').hasClass('even') &&
56 ! $('#example tbody tr:eq(3)').hasClass('odd');
57 }
58 );
59
60 oTest.fnComplete();
61 } );