first commit

This commit is contained in:
2022-04-13 13:51:55 +07:00
commit 47e209c023
3107 changed files with 238911 additions and 0 deletions

View File

@ -0,0 +1,50 @@
<!DOCTYPE html>
<html>
<head>
<title>jQuery Smart Wizard test file</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="smartwizard">
<ul class="nav">
<li class="nav-item">
<a class="nav-link" href="#step-1">
<strong>Step 1</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-2">
<strong>Step 2</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-3">
<strong>Step 3</strong> This is step description
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#step-4">
<strong>Step 4</strong> This is step description
</a>
</li>
</ul>
<div class="tab-content">
<div id="step-1" class="tab-pane" role="tabpanel" aria-labelledby="step-1">
Step 1 Content
</div>
<div id="step-2" class="tab-pane" role="tabpanel" aria-labelledby="step-2">
Step 2 Content
</div>
<div id="step-3" class="tab-pane" role="tabpanel" aria-labelledby="step-3">
Step 3 Content
</div>
<div id="step-4" class="tab-pane" role="tabpanel" aria-labelledby="step-4">
Step 4 Content
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,57 @@
describe('SmartWizard Default Options', function() {
var el;
beforeEach(function(){
jasmine.getFixtures().fixturesPath = 'base/test';
loadFixtures('test-template.html');
el = $('#smartwizard');
el.smartWizard();
});
afterEach(function(){
el.remove();
el = null;
});
it('should add default class to the element', function() {
expect(el).toHaveClass("sw");
});
it('should add default theme to the element', function() {
expect(el).toHaveClass("sw-theme-default");
});
it('should add toolbar elements', function() {
expect(el.find('.toolbar')).toExist();
expect(el.find('.toolbar').find('.sw-btn-next')).toExist();
expect(el.find('.toolbar').find('.sw-btn-prev')).toExist();
});
});
describe('SmartWizard Navigation', function() {
var el;
beforeEach(function(){
jasmine.getFixtures().fixturesPath = 'base/test';
loadFixtures('test-template.html');
el = $('#smartwizard');
el.smartWizard();
});
afterEach(function(){
el.remove();
el = null;
});
it('should show the first step', function() {
expect(el.find('.nav').find('.nav-link').first()).toHaveClass("active");
});
it('should not show other steps', function() {
expect(el.find('.nav').find('.nav-link:not(:first)')).not.toHaveClass("active");
});
});