Unreviewed, rolling out r216677.
[WebKit-https.git] / PerformanceTests / Speedometer / resources / todomvc / dependency-examples / flight / test / spec / ui / toggle_all_spec.js
1 describeComponent('app/js/ui/toggle_all', function () {
2     'use strict';
3
4     beforeEach(function () {
5         setupComponent(readFixtures('toggle_all.html'));
6     });
7
8     it('check the checkbox w/o remaining', function () {
9         var data = {
10             all: 2,
11             remaining: 0,
12             completed: 2,
13             filter: ''
14         };
15         $(document).trigger('dataStatsCounted', data);
16         expect(this.component.$node).toBeChecked();
17     });
18
19     it('uncheck the checkbox w/ remaining', function () {
20         var data = {
21             all: 2,
22             remaining: 1,
23             completed: 1,
24             filter: ''
25         };
26         $(document).trigger('dataStatsCounted', data);
27         expect(this.component.$node).not.toBeChecked();
28     });
29 });
30