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);
21 expect($(defaults.selectors.statusCurrent)).toHaveText(3);
24 it('should update to the correct number on slide change', function() {
26 expect($(defaults.selectors.statusCurrent)).toHaveText('3');
30 describe('countNested false indicator', function() {
31 beforeEach(function() {
32 loadFixtures('nesteds.html');
33 if (Modernizr.history) {
34 history.replaceState({}, "", "#")
37 window.location.hash = '#';
44 it('should ignore nested slides in the total', function() {
45 expect($(defaults.selectors.statusTotal)).toHaveText('5');
48 it('should update to the root slide number when nested becomes active', function() {
50 expect($(defaults.selectors.statusCurrent)).toHaveText('4');
52 expect($(defaults.selectors.statusCurrent)).toHaveText('3');
54 expect($(defaults.selectors.statusCurrent)).toHaveText('3');
56 expect($(defaults.selectors.statusCurrent)).toHaveText('2');