Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Test case for S2.FX.Parallel fix. #28

Open
wants to merge 2 commits into from

1 participant

@rafalwrzeszcz

This is the test case for my previous pull request, which was already merged.

Also I include small fix for XHTML compatibility - browsers don't tolerate named entities in innerHTML when page is served as real XHTML (application/xhtml+xml). If you don't like UTF-8 characters inline you can replace it with character entity  .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 13, 2011
  1. @rafalwrzeszcz
Commits on Apr 18, 2011
  1. @rafalwrzeszcz
This page is out of date. Refresh to see the latest.
Showing with 26 additions and 1 deletion.
  1. +2 −1  src/ui/controls/button.js
  2. +24 −0 test/unit/effects_test.js
View
3  src/ui/controls/button.js
@@ -231,7 +231,8 @@
var span = new Element('span', { 'class': 'ui-button-text' });
// Even an empty text element (e.g., for icon-only buttons) needs to
// have at least one character of text to force proper alignment.
- span.update(text || " ");
+ // Be careful - UTF-8 character here!
+ span.update(text || " ");
return span;
},
View
24 test/unit/effects_test.js
@@ -289,6 +289,30 @@ new Test.Unit.Runner({
});
});
}},
+
+ testEffectsParallel: function() { with(this) {
+ var calledStart = false, calledCancel = false;
+
+ var effect = new S2.FX.SlideDown('sandbox');
+ var start = effect.start, cancel = effect.cancel;
+
+ // wrap methods
+ effect.start = function() {
+ calledStart = true;
+ start.call(effect);
+ };
+ effect.cancel = function(after) {
+ calledCancel = true;
+ cancel.call(effect, after);
+ };
+
+ (new S2.FX.Parallel([effect],{ duration:0.75 })).play();
+
+ wait(800, function() {
+ assertEqual(calledStart, true);
+ assertEqual(calledCancel, true);
+ });
+ }},
testElementMorph: function() { with(this) {
$('error_test_ul').morph('font-size:40px', {duration: 0.75}).setStyle({marginRight:'17px'});
Something went wrong with that request. Please try again.