Skip to content

Commit

Permalink
Fix all failing tests because of switch-light markup change.
Browse files Browse the repository at this point in the history
Add new tests for the Material theme and switch-toggle with 6 options.
  • Loading branch information
ghinda committed Nov 18, 2015
1 parent a96ac5e commit 4162b02
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 27 deletions.
106 changes: 83 additions & 23 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,16 @@
<div class="barebones">
<label class="switch-light" onclick="">
<input type="checkbox">
<span>

<strong>
Wireless
</strong>

<span>
<span>Off</span>
<span>On</span>
<a></a>
</span>

<a></a>
</label>

<div class="switch-toggle">
Expand All @@ -57,19 +60,21 @@
</div>
</div>

<div class="android">
<label class="switch-light switch-android" onclick="">
<div class="holo">
<label class="switch-light switch-holo" onclick="">
<input type="checkbox">
<span>
<strong>
Wireless
</strong>

<span>
<span>Off</span>
<span>On</span>
<a></a>
</span>

<a></a>
</label>

<div class="switch-toggle switch-android">
<div class="switch-toggle switch-holo">
<input id="android1" name="android" type="radio" checked>
<label for="android1" onclick="">Week</label>

Expand All @@ -83,13 +88,15 @@
<div class="candy">
<label class="switch-light switch-candy" onclick="">
<input type="checkbox">
<span>
<strong>
Wireless
</strong>

<span>
<span>Off</span>
<span>On</span>
<a></a>
</span>

<a></a>
</label>

<div class="switch-toggle switch-candy">
Expand All @@ -106,16 +113,45 @@
<div class="ios">
<label class="switch-light switch-ios" onclick="">
<input type="checkbox">
<span>

<strong>
Wireless
</strong>

<span>
<span>Off</span>
<span>On</span>
<a></a>
</span>
</label>

<div class="switch-toggle switch-ios">
<input id="ios1" name="ios" type="radio" checked>
<label for="ios1" onclick="">Week</label>

<input id="ios2" name="ios" type="radio">
<label for="ios2" onclick="">Month</label>

<a></a>
</div>
</div>

<div class="material">
<label class="switch-light switch-material" onclick="">
<input type="checkbox">

<strong>
Wireless
</strong>

<span>
<span>Off</span>
<span>On</span>
<a></a>
</span>
</label>

<div class="switch-toggle switch-ios">
<div class="switch-toggle switch-material">
<input id="ios1" name="ios" type="radio" checked>
<label for="ios1" onclick="">Week</label>

Expand All @@ -126,7 +162,7 @@
</div>
</div>

<div class="switch-toggle switch-3">
<div class="switch-toggle test-3">
<input id="three1" name="three" type="radio" checked>
<label for="three1" onclick="">Week</label>

Expand All @@ -139,7 +175,7 @@
<a></a>
</div>

<div class="switch-toggle switch-4">
<div class="switch-toggle test-4">
<input id="four1" name="four" type="radio" checked>
<label for="four1" onclick="">Week</label>

Expand All @@ -155,7 +191,7 @@
<a></a>
</div>

<div class="switch-toggle switch-5">
<div class="switch-toggle test-5">
<input id="five0" name="five" type="radio" checked>
<label for="five0" onclick="">Day</label>

Expand All @@ -174,19 +210,43 @@
<a></a>
</div>

<div class="switch-toggle test-6">
<input id="six0" name="six" type="radio" checked>
<label for="six0" onclick="">Day</label>

<input id="six1" name="six" type="radio">
<label for="six1" onclick="">Week</label>

<input id="six2" name="six" type="radio">
<label for="six2" onclick="">Month</label>

<input id="six3" name="six" type="radio">
<label for="six3" onclick="">Year</label>

<input id="six4" name="six" type="radio">
<label for="six4" onclick="">Decade</label>

<input id="six5" name="six" type="radio">
<label for="six5" onclick="">Decade</label>

<a></a>
</div>

<div class="bootstrap">
<label class="switch-light well" onclick="">
<label class="switch-light" onclick="">
<input type="checkbox">
<span>
<strong>
Wireless
</strong>

<span class="well">
<span>Off</span>
<span>On</span>
<a class="btn btn-primary"></a>
</span>

<a class="btn btn-primary"></a>
</label>

<div class="switch-toggle switch-3 well col-lg-9">
<div class="switch-toggle well col-lg-9">
<input id="bootstrap1" name="bootstrap" type="radio" checked>
<label for="bootstrap1" onclick="">Week</label>

Expand All @@ -202,7 +262,7 @@

<div class="foundation">

<div class="switch-toggle switch-3 panel large-9 columns">
<div class="switch-toggle panel large-9 columns">
<input id="foundation1" name="foundation" type="radio" checked>
<label for="foundation1" onclick="">Week</label>

Expand Down
10 changes: 6 additions & 4 deletions test/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@ window.onload = function() {
setTimeout(function() {

testSwitchTheme('Barebones Switches (no theme)', 'barebones');
testSwitchTheme('Android Theme', 'android');
testSwitchTheme('Holo Theme', 'holo');
testSwitchTheme('Candy Theme', 'candy');
testSwitchTheme('iOS Theme', 'ios');
testSwitchTheme('Material Theme', 'material');

testSwitchNumber('Switch-toggle with 3 options', 'switch-3');
testSwitchNumber('Switch-toggle with 4 options', 'switch-4');
testSwitchNumber('Switch-toggle with 5 options', 'switch-5');
testSwitchNumber('Switch-toggle with 3 options', 'test-3');
testSwitchNumber('Switch-toggle with 4 options', 'test-4');
testSwitchNumber('Switch-toggle with 5 options', 'test-5');
testSwitchNumber('Switch-toggle with 6 options', 'test-6');

testSwitchTheme('Bootstrap', 'bootstrap');
testSwitchTheme('Foundation', 'foundation');
Expand Down

0 comments on commit 4162b02

Please sign in to comment.