Side navigation
Ticket #1751: 1751.test.diff
File 1751.test.diff, 0.9 KB (added by davidserduke, October 03, 2007 05:12PM UTC)
Index: test/unit/fx.js
===================================================================
--- test/unit/fx.js (revision 3541)
+++ test/unit/fx.js (working copy)
@@ -232,7 +232,7 @@
var check = ['opacity','height','width','display','overflow'];
jQuery.fn.saveState = function(){
- expect(check.length);
+ expect(check.length * this.length);
stop();
return this.each(function(){
var self = this;
@@ -288,6 +288,15 @@
$('#slidetoggleout div').saveState().slideToggle('fast').slideToggle('fast',checkState);
});
+test("Multiple/opposite slideToggle()", function() {
+ var x = $("#ap,#foo");
+ x.filter("#foo").hide();
+ x.saveState().slideToggle('fast').slideToggle('fast', function () {
+ checkState.call(this);
+ x.filter("#foo").show();
+ });
+});
+
function makeTest( text ){
var elem = $("<div></div>")
.attr("id", "test" + makeTest.id++)
Download in other formats:
Original Format
File 1751.test.diff, 0.9 KB (added by davidserduke, October 03, 2007 05:12PM UTC)
Index: test/unit/fx.js
===================================================================
--- test/unit/fx.js (revision 3541)
+++ test/unit/fx.js (working copy)
@@ -232,7 +232,7 @@
var check = ['opacity','height','width','display','overflow'];
jQuery.fn.saveState = function(){
- expect(check.length);
+ expect(check.length * this.length);
stop();
return this.each(function(){
var self = this;
@@ -288,6 +288,15 @@
$('#slidetoggleout div').saveState().slideToggle('fast').slideToggle('fast',checkState);
});
+test("Multiple/opposite slideToggle()", function() {
+ var x = $("#ap,#foo");
+ x.filter("#foo").hide();
+ x.saveState().slideToggle('fast').slideToggle('fast', function () {
+ checkState.call(this);
+ x.filter("#foo").show();
+ });
+});
+
function makeTest( text ){
var elem = $("<div></div>")
.attr("id", "test" + makeTest.id++)