コード例 #1
0
ファイル: Wizard.js プロジェクト: AKIo0O/esui
 it('should not fire when `stepPrevious` is called on the first step', function () {
     var wizard = new Wizard({ steps: steps, activeIndex: 0 });
     wizard.appendTo(container);
     var handler = jasmine.createSpy();
     wizard.on('enter', handler);
     wizard.stepPrevious();
     expect(handler).not.toHaveBeenCalled();
 });
コード例 #2
0
ファイル: Wizard.js プロジェクト: AKIo0O/esui
 it('should do nothing when `stepPrevious` is called on the first step', function () {
     var wizard = new Wizard({ steps: steps, activeIndex: 0 });
     wizard.stepPrevious();
     expect(wizard.get('activeIndex')).toBe(0);
 });
コード例 #3
0
ファイル: Wizard.js プロジェクト: AKIo0O/esui
 it('should decrement `activeIndex` by 1 when `stepPrevious` is called', function () {
     var wizard = new Wizard({ steps: steps, activeIndex: 2 });
     wizard.stepPrevious();
     expect(wizard.get('activeIndex')).toBe(1);
 });