1 describe('Deck JS Status Indicator', function() {
2 beforeEach(function() {
3 loadFixtures('standard.html');
4 if (Modernizr
.history
) {
5 history
.replaceState({}, "", "#")
8 window
.location
.hash
= '#';
13 it('should show the correct total number of slides', function() {
14 expect($(defaults
.selectors
.statusTotal
)).toHaveText($.deck('getSlides').length
);
17 it('should start at the right current slide', function() {
18 expect($(defaults
.selectors
.statusCurrent
)).toHaveText(1);
22 return $(defaults
.selectors
.statusCurrent
).text() === '3';
26 it('should update to the correct number on slide change', function() {
28 expect($(defaults
.selectors
.statusCurrent
)).toHaveText('3');
32 describe('countNested false indicator', function() {
33 beforeEach(function() {
34 loadFixtures('nesteds.html');
35 if (Modernizr
.history
) {
36 history
.replaceState({}, "", "#")
39 window
.location
.hash
= '#';
46 it('should ignore nested slides in the total', function() {
47 expect($(defaults
.selectors
.statusTotal
)).toHaveText('5');
50 it('should update to the root slide number when nested becomes active', function() {
52 expect($(defaults
.selectors
.statusCurrent
)).toHaveText('4');
54 expect($(defaults
.selectors
.statusCurrent
)).toHaveText('3');
56 expect($(defaults
.selectors
.statusCurrent
)).toHaveText('3');
58 expect($(defaults
.selectors
.statusCurrent
)).toHaveText('2');