GROUP "dijit/_base/place" has 13 tests to run
PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenTL 6 ms
PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenTR 9 ms
_AssertFailure: assertEqual() failed:
expected
358.3999938964844px
but got
358.39px
with hint:
left sides aligned
ERROR IN:
function placeOnScreenAroundNodeT(t){
// Dropdown from "aroundTop" node. Should pick the second choice, since the first
// goes offscreen.
var ret = dijit.placeOnScreenAroundNode(popup, aroundTop, {
"TL": "BL", // aroundTop's top-left corner with the popup's bottom-left corner (fails)
"BL": "TL", // aroundTop's bottom-left corner with the popup's top-left corner (works)
"BR": "TR" // aroundTop's bottom-right corner with the popup's top-right corner (works)
});
doh.is("BL", ret.aroundCorner, "around corner");
doh.is("TL", ret.corner, "popup's corner");
doh.is("20px", popup.style.top, "underneath around node");
doh.is(dojo.position(aroundTop).x+"px", popup.style.left, "left sides aligned");
}
FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeT 8 ms
_AssertFailure: assertEqual() failed:
expected
378.3999938964844
but got
378.3899841308594
with hint:
right sides aligned
ERROR IN:
function placeOnScreenAroundNodeTooltip(t){
// Same as above test except that shape of drop down changes depending on where it's positioned.
// Simulates tooltip placement (tooltip shape changes b/c of the arrow).
// Should pick the third choice this time
function layoutNode(node, aroundCorner, nodeCorner){
node.style.width = (nodeCorner == "TL" ? "5000px" : "75px");
}
var ret = dijit.placeOnScreenAroundNode(popup, aroundTop, {
"TL": "BL", // aroundTop's top-left corner with the popup's bottom-left corner (fails)
"BL": "TL", // aroundTop's bottom-left corner with the popup's top-left corner (works)
"BR": "TR" // aroundTop's bottom-right corner with the popup's top-right corner (works)
}, layoutNode);
doh.is("BR", ret.aroundCorner, "around corner");
doh.is("TR", ret.corner, "popup's corner");
doh.is("20px", popup.style.top, "underneath around node");
doh.is(dojo.position(aroundTop).x+dojo.position(aroundTop).w,
dojo.position(popup).x+dojo.position(popup).w,
"right sides aligned");
}
FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeTooltip 46 ms
PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeB 8 ms
_AssertFailure: assertEqual() failed:
expected
566
but got
565.989990234375
with hint:
above around node
ERROR IN:
function placeOnScreenAroundNodeBM(t){
// bottom middle popup from "aroundBottom" node
var ret = dijit.placeOnScreenAroundNode(popup, aroundBottom, {
"TR": "TL", // aroundBottom's top-right corner with the popup's top-left corner (fails)
"TM": "BM", // aroundBottom's top-middle with the popup's bottom-middle (works)
"BM": "TM", // aroundBottom's bottom-middle with the popup's top-middle (fails)
"TL": "TR" // aroundBottom's top-left corner with the popup's top-right corner (fails)
});
doh.is("TM", ret.aroundCorner, "around middle");
doh.is("BM", ret.corner, "popup's middle");
var popupPos = dojo.position(popup);
var aroundPos = dojo.position(aroundBottom);
doh.is(aroundPos.y, popupPos.y + popupPos.h, "above around node");
doh.t(aroundPos.x > popupPos.x, "starts before around node");
doh.t(aroundPos.x < (popupPos.x + popupPos.w), "ends after around node");
}
FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeBM 20 ms
PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeTM 9 ms
PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeML 8 ms
_AssertFailure: assertEqual() failed:
expected
695.7899780273437
but got
695.7999877929687
with hint:
before around node
ERROR IN:
function placeOnScreenAroundNodeMR(t){
// middle left popup from "aroundRight" node
var ret = dijit.placeOnScreenAroundNode(popup, aroundRight, {
"BL": "TL", // aroundRight's bottom-left corner with the popup's top-left corner (fails)
"MR": "ML", // aroundRight's middle-right with the popup's middle-left (fails)
"ML": "MR", // aroundRight's middle-left with the popup's middle-right (works)
"TL": "BL" // aroundRight's top-left corner with the popup's bottom-left corner (fails)
});
doh.is("ML", ret.aroundCorner, "around middle");
doh.is("MR", ret.corner, "popup's middle");
var popupPos = dojo.position(popup);
var aroundPos = dojo.position(aroundRight);
doh.is(popupPos.x + popupPos.w, aroundPos.x, "before around node");
doh.t(aroundPos.y > popupPos.y, "starts before around node");
doh.t(aroundPos.y < (popupPos.y + popupPos.h), "ends after around node");
}
FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeMR 11 ms
PASSED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeMLB 8 ms
_AssertFailure: assertEqual() failed:
expected
717
but got
716.7999877929687
with hint:
right aligned with around node
ERROR IN:
function placeOnScreenAroundNodeMRT(t){
// top middle popup from "aroundRight" node
var ret = dijit.placeOnScreenAroundNode(popup, aroundRight, {
"BL": "TL", // aroundRight's bottom-left corner with the popup's top-left corner (fails)
"TM": "BM", // aroundRight's top-middle with the popup's bottom-middle (works)
"TL": "BL" // aroundRight's top-left corner with the popup's bottom-left corner (fails)
});
doh.is("TM", ret.aroundCorner, "around middle");
doh.is("BM", ret.corner, "popup's middle");
var popupPos = dojo.position(popup);
var aroundPos = dojo.position(aroundRight);
doh.is(popupPos.x + popupPos.w, aroundPos.x + aroundPos.w + 1/*right:1px*/, "right aligned with around node");
doh.is(popupPos.y + popupPos.h, aroundPos.y, "above around node");
}
FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeMRT 15 ms
_AssertFailure: assertEqual() failed:
expected
358.3999938964844
but got
358.3899841308594
with hint:
before around node
ERROR IN:
function placeOnScreenAroundNodeTML(t){
// middle left popup from "aroundTop" node
var ret = dijit.placeOnScreenAroundNode(popup, aroundTop, {
"BL": "BR", // aroundTop's bottom-left corner with the popup's bottom-right corner (fails)
"ML": "MR", // aroundTop's middle-left with the popup's middle-right (works)
"BR": "BL" // aroundTop's bottom-right corner with the popup's bottom-left corner (fails)
});
doh.is("ML", ret.aroundCorner, "around middle");
doh.is("MR", ret.corner, "popup's middle");
var popupPos = dojo.position(popup);
var aroundPos = dojo.position(aroundTop);
doh.is(aroundPos.x, popupPos.x + popupPos.w, "before around node");
doh.is(aroundPos.y, popupPos.y, "top aligned with around node");
}
FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeTML 12 ms
_AssertFailure: assertEqual() failed:
expected
378.3999938964844
but got
378.3899841308594
with hint:
after around node
ERROR IN:
function placeOnScreenAroundNodeBMR(t){
// middle right popup from "aroundBottom" node
var ret = dijit.placeOnScreenAroundNode(popup, aroundBottom, {
"TL": "TR", // aroundBottom's top-left corner with the popup's top-right corner (fails)
"MR": "ML", // aroundBottom's middle-right with the popup's middle-left (works)
"TR": "TL" // aroundBottom's top-right corner with the popup's top-left corner (fails)
});
doh.is("MR", ret.aroundCorner, "around middle");
doh.is("ML", ret.corner, "popup's middle");
var popupPos = dojo.position(popup);
var aroundPos = dojo.position(aroundBottom);
doh.is(aroundPos.x + aroundPos.w, popupPos.x, "after around node");
doh.is(aroundPos.y + aroundPos.h + 5/*bottom:5px*/, popupPos.y + popupPos.h, "bottom aligned with around node");
}
FAILED test: ../../dijit/tests/_base/place.html::dijit/_base/place::placeOnScreenAroundNodeBMR 19 ms
GROUP "around" has 9 tests to run
_AssertFailure: assertEqual() failed:
expected
358.3999938964844px
but got
358.39px
with hint:
left sides aligned
ERROR IN:
function aroundT(t){
// Dropdown from "aroundTop" node. Should pick the second choice, since the first
// goes off screen.
var ret = place.around(popup, aroundTop, [
"above", // aroundTop's top-left corner with the popup's bottom-left corner (fails)
"below", // aroundTop's bottom-left corner with the popup's top-left corner (works)
"below-alt" // aroundTop's bottom-right corner with the popup's top-right corner (works)
], true);
doh.is("BL", ret.aroundCorner, "around corner");
doh.is("TL", ret.corner, "popup's corner");
doh.is("20px", popup.style.top, "underneath around node");
doh.is(domGeometry.position(aroundTop).x+"px", popup.style.left, "left sides aligned");
}
FAILED test: ../../dijit/tests/place.html::around::aroundT 14 ms
_AssertFailure: assertEqual() failed:
expected
378.3999938964844
but got
378.3899841308594
with hint:
right sides aligned
ERROR IN:
function aroundTooltip(t){
// Same as above test except that shape of drop down changes depending on where it's positioned.
// Simulates tooltip placement (tooltip shape changes b/c of the arrow).
// Should pick the third choice this time
function layoutNode(node, aroundCorner, nodeCorner){
node.style.width = (nodeCorner == "TL" ? "5000px" : "75px");
}
var ret = place.around(popup, aroundTop, [
"above", // aroundTop's top-left corner with the popup's bottom-left corner (fails)
"below", // aroundTop's bottom-left corner with the popup's top-left corner (works)
"below-alt" // aroundTop's bottom-right corner with the popup's top-right corner (works)
], true, layoutNode);
doh.is("BR", ret.aroundCorner, "around corner");
doh.is("TR", ret.corner, "popup's corner");
doh.is("20px", popup.style.top, "underneath around node");
doh.is(domGeometry.position(aroundTop).x+domGeometry.position(aroundTop).w,
domGeometry.position(popup).x+domGeometry.position(popup).w,
"right sides aligned");
}
FAILED test: ../../dijit/tests/place.html::around::aroundTooltip 26 ms
PASSED test: ../../dijit/tests/place.html::around::aroundB 9 ms
_AssertFailure: assertEqual() failed:
expected
566
but got
565.989990234375
with hint:
above around node
ERROR IN:
function aroundBM(t){
// bottom middle popup from "aroundBottom" node
var ret = place.around(popup, aroundBottom, [
"above-centered", // aroundBottom's top-middle with the popup's bottom-middle (works)
"below-centered" // aroundBottom's bottom-middle with the popup's top-middle (fails)
], true);
doh.is("TM", ret.aroundCorner, "around middle");
doh.is("BM", ret.corner, "popup's middle");
var popupPos = domGeometry.position(popup);
var aroundPos = domGeometry.position(aroundBottom);
doh.is(aroundPos.y, popupPos.y + popupPos.h, "above around node");
doh.t(aroundPos.x > popupPos.x, "starts before around node");
doh.t(aroundPos.x < (popupPos.x + popupPos.w), "ends after around node");
}
FAILED test: ../../dijit/tests/place.html::around::aroundBM 8 ms
PASSED test: ../../dijit/tests/place.html::around::aroundTM 12 ms
PASSED test: ../../dijit/tests/place.html::around::aroundML 9 ms
_AssertFailure: assertEqual() failed:
expected
695.7899780273437
but got
695.7999877929687
with hint:
before around node
ERROR IN:
function aroundMR(t){
// middle left popup from "aroundRight" node
var ret = place.around(popup, aroundRight, [
"after-centered", // aroundRight's middle-right with the popup's middle-left (fails)
"before-centered" // aroundRight's middle-left with the popup's middle-right (works)
], true);
doh.is("ML", ret.aroundCorner, "around middle");
doh.is("MR", ret.corner, "popup's middle");
var popupPos = domGeometry.position(popup);
var aroundPos = domGeometry.position(aroundRight);
doh.is(popupPos.x + popupPos.w, aroundPos.x, "before around node");
doh.t(aroundPos.y > popupPos.y, "starts before around node");
doh.t(aroundPos.y < (popupPos.y + popupPos.h), "ends after around node");
}
FAILED test: ../../dijit/tests/place.html::around::aroundMR 9 ms
PASSED test: ../../dijit/tests/place.html::around::aroundMLB 9 ms
_AssertFailure: assertEqual() failed:
expected
715.7899780273437
but got
715.7999877929687
with hint:
right aligned with around node
ERROR IN:
function aroundMRT(t){
// This will put the drop-down above the "aroundRight" node, first trying to left-align
// but since that doesn't work then trying to right-align.
var ret = place.around(popup, aroundRight, ["above"], true);
doh.is("TR", ret.aroundCorner, "around right");
doh.is("BR", ret.corner, "popup's right");
var popupPos = domGeometry.position(popup);
var aroundPos = domGeometry.position(aroundRight);
doh.is(popupPos.x + popupPos.w, aroundPos.x + aroundPos.w, "right aligned with around node");
doh.is(popupPos.y + popupPos.h, aroundPos.y, "above around node");
}
FAILED test: ../../dijit/tests/place.html::around::aroundMRT 12 ms
PASSED test: ../../dijit/tests/place.html 503 ms
Thanks, I'll check in a fix to trunk. Since it's only changes to the test I guess it doesn't need to be backported.