You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

26 lines
688 B

(function (Ply) {
module('Ply.stack');
function hasParent(el) {
return !!(el && el.parentNode && el.parentNode.nodeType !== 11);
}
asyncTest('2x', function () {
new Ply('foo', { effect: 'slide' }).open().then(function (foo) {
new Ply('bar', { effect: 'fall' }).open().then(function (bar) {
ok(!hasParent(foo.layerEl), 'foo.parent == null');
ok(!hasParent(bar.overlayBoxEl), 'bar.parent == null');
Ply.stack.last.close().then(function () {
ok(hasParent(foo.layerEl), 'foo.parent != null');
ok(hasParent(bar.overlayBoxEl), 'bar.parent != null');
Ply.stack.last.close().then(function () {
start();
});
});
});
});
});
})(Ply);