Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.execute(function () {
// note: "return node.getBoundingClientRect();" doesn't work on IE; webdriver bug.
var dropDownRect = document.querySelector(".centered-dialog").getBoundingClientRect();
return {
// Use delite/Viewport to get size because window.innerWidth not quite right on iOS7.1.
// It returns 304 instead of 320.
viewport: require("delite/Viewport").getEffectiveBox(),
dropDownRect: {
left: dropDownRect.left,
width: dropDownRect.width,
top: dropDownRect.top,
height: dropDownRect.height
}
};
})
.then(function (ret) {
destroy: function () {
// setup
dd = new SimpleDropDownButton({id: "dd2"}).placeAt(container);
popup = dd.dropDown;
assert.ok(!!popup, "popup exists");
// open
click(dd);
assert.ok(helpers.isVisible(popup), "popup visible");
assert.strictEqual(1, require("delite/popup")._stack.length, "in popup manager stack");
// destroy
dd.destroy();
assert.strictEqual(0, require("delite/popup")._stack.length, "popup was closed");
},
beforeEach: function () {
container = document.createElement("div");
document.body.appendChild(container);
container.innerHTML = html;
register.deliver();
}
};
auto: function () {
register.deliver();
var b3 = document.getElementById("b3");
var div1 = b3.querySelector(".d-switch-leading");
var div2 = b3.querySelector(".d-switch-trailing");
assert.strictEqual(b3.effectiveDir === "ltr" ? div1.textContent : div2.textContent,
"\u202b\u05d0\u05d1\u05d2\u202c", "auto: wrong displayed value for 'uncheckedLabel'");
assert.strictEqual(b3.title, "\u202aABC \u05d0\u05d1\u05d2\u202c",
"auto: wrong value for 'title'");
}
},
beforeEach: function () {
container = document.createElement("div");
document.body.appendChild(container);
container.innerHTML = html;
register.deliver();
},
before: function () {
container = document.createElement("div");
document.body.appendChild(container);
container.innerHTML = htmlContent;
register.deliver();
node = document.getElementById("vs");
aaa = document.getElementById("aaa");
bbb = document.getElementById("bbb");
ccc = document.getElementById("ccc");
ddd = document.getElementById("ddd");
},
beforeEach: function () {
container = document.createElement("div");
document.body.appendChild(container);
container.innerHTML = html;
register.deliver();
},
"Initialization": function () {
container.innerHTML = html;
register.deliver();
var combo = document.getElementById("combo1");
checkCombobox(combo, this);
var combo1 = document.getElementById("mycombo1");
checkCombobox(combo1, this);
},
beforeEach: function () {
container = document.createElement("div");
document.body.appendChild(container);
container.innerHTML = html;
register.deliver();
}
};
beforeEach: function () {
container = document.createElement("div");
document.body.appendChild(container);
container.innerHTML = html;
register.deliver();
}
};