diff -r dc319ece0bd6 -r cc3987eb793c testfunc/test/jstests/test_htmlhelpers.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testfunc/test/jstests/test_htmlhelpers.js Wed Jul 20 18:21:47 2011 +0200 @@ -0,0 +1,36 @@ +$(document).ready(function() { + + module("module2", { + setup: function() { + $('#main').append(''); + } + }); + + test("test first selected", function() { + $('#theselect').append('' + + '' + + '' + + ''); + var selected = firstSelected(document.getElementById("theselect")); + equals(selected.value, 'bar'); + }); + + test("test first selected 2", function() { + $('#theselect').append('' + + '' + + '' + + ''); + var selected = firstSelected(document.getElementById("theselect")); + equals(selected, null); + }); + + module("visibilty"); + test('toggleVisibility', function() { + $('#main').append('
'); + toggleVisibility('foo'); + ok($('#foo').hasClass('hidden'), 'check hidden class is set'); + }); + +}); +