transition.html revision 2e49faa8717cc2acbd7ab2aac237061848568a6c
338N/A Y.namespace('Tests');
338N/A Y.Tests.Transition = (function(){
338N/A var suite = new Y.Test.Suite('Transition Tests');
338N/A test.resume(function() {
338N/A node.setStyle('height', '');
0N/A h = node.getComputedStyle('height'),
27N/A node.setStyle('height', 0);
0N/A node.setStyle('height', h);
27N/A test.resume(function() {
27N/A node.setStyle('height', '');
27N/A test.resume(function() {
27N/A node.setStyle('height', '');
311N/A h = node.getComputedStyle('height'),
311N/A test.resume(function() {
311N/A node.setStyle('height', h);
338N/A node.setStyle('height', 0);
27N/A test.resume(function() {
27N/A node.setStyle('height', '');
27N/A node.setStyle('display', 'none');
27N/A node.setStyle('opacity', '0');
27N/A test.resume(function() {
311N/A node.setStyle('display', 'none');
27N/A node.setStyle('opacity', '0');
613N/A test.resume(function() {
27N/A h = node.getComputedStyle('height'),
27N/A w = node.getComputedStyle('width');
613N/A test.resume(function() {
27N/A h = node.getComputedStyle('height'),
27N/A w = node.getComputedStyle('width');
311N/A test.resume(function() {
27N/A h = node.getComputedStyle('height'),
27N/A w = node.getComputedStyle('width');
27N/A test.resume(function() {
189N/A node.setStyle('opacity', 0);
27N/A test.resume(function() {
27N/A test.resume(function() {
27N/A node.setStyle('display', 'block');
0N/A node.setStyle('opacity', '1');
27N/A node.transition(['fadeOut', 'fadeIn'], function(e) {
27N/A test.resume(function() {
0N/A node.transition('fadeOut');
0N/A test.resume(function() {
0N/A node.transition('fadeOut', {height: '0px'});
0N/A test.resume(function() {
0N/A //node.setStyle('opacity', 1);
0N/A node.transition('fadeOut', function(e) {
0N/A test.resume(function() {
0N/A node.transition('fadeIn', {duration: 2}, function(e) {
0N/A test.resume(function() {
0N/A test.resume(function() {
0N/A test.resume(function() {
0N/A node.setStyle('height', '100px');
0N/A test.resume(function() { // shouldnt fire
0N/A Y.Assert.isNull(1);
0N/A test.resume(function() { // shouldnt fire
0N/A Y.Assert.isNull(1);
0N/A test.resume(function() {
0N/A node.setStyle('height', '100px');
0N/A test.resume(function() {
0N/A test.resume(function() {
276N/A node.setStyle('height', '100px');
222N/A test.resume(function() {
189N/A test.resume(function() {
189N/A node.setStyle('height', '100px');
338N/A test.resume(function() {
222N/A test.resume(function() {
0N/A node.setStyle('width', '100px');
5N/A test.resume(function() {
test.resume(function() {
test.wait(2000);
test.wait(2500);
var node = Y.one('.demo'),
node.setStyle('height', '100px');
Y.all('.demo').setStyles({
var nodes = Y.all('.demo'),
node1 = nodes.item(0),
node2 = nodes.item(1),
test.resume(function () {
test.wait(2500);
Y.all('.demo').transition({duration: 1, opacity: 0}, function(e) {
test.resume(function() {
var nodes = Y.all('.demo');
test.wait(2000);
Y.all('.demo').setStyles({
var node = Y.one('.demo'),
test.resume(function() {
test.wait(2000);
var node = Y.one('.demo'),
test.resume(function() {
test.wait(2000);
var node = Y.one('.demo'),
test.resume(function() {
test.wait(2000);
var node = Y.one('.demo'),
node.setStyle('width', 0);
test.resume(function() {
test.wait(2000);
var node = Y.one('.demo'),
test.resume(function() {
test.wait(2000);
var node = Y.one('.demo'),
test.resume(function() {
node.setStyle('height', '100px');
node.setStyle('opacity', '1');
test.wait(3000);
var node = Y.one('.demo'),
node.once('transition:end', function(e) {
test.resume(function() {
node.setStyle('height', '100px');
node.setStyle('opacity', '1');
node.transition(config);
test.wait(4000);
var node = Y.one('.demo'),
test.resume(function() {
node.setStyle('height', '100px');
if (Y.UA.webkit) {
Y.Assert.areEqual('matrix(-1, 0.00000000000000012246467991473532, -0.00000000000000012246467991473532, -1, 0, 0)', node.getComputedStyle('WebkitTransform'));
test.wait(2000);
var node = Y.one('.demo'),
node.setStyle('height', '100px');
var node = Y.one('.demo'),
test.resume(function() {
var node = Y.one('.demo');
node.destroy();
test.wait(2000);
var node = Y.one('.demo'),
node.toggleView(false, function() {
test.resume(function() {
node.destroy();
test.wait(2000);
new Y.Console({