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.

27 lines
688 B

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