201 | | |
| 201 | GROUP "around" has 9 tests to run |
| 202 | _AssertFailure: assertEqual() failed: |
| 203 | expected |
| 204 | 358.3999938964844px |
| 205 | but got |
| 206 | 358.39px |
| 207 | |
| 208 | with hint: |
| 209 | left sides aligned |
| 210 | |
| 211 | ERROR IN: |
| 212 | function aroundT(t){ |
| 213 | // Dropdown from "aroundTop" node. Should pick the second choice, since the first |
| 214 | // goes off screen. |
| 215 | var ret = place.around(popup, aroundTop, [ |
| 216 | "above", // aroundTop's top-left corner with the popup's bottom-left corner (fails) |
| 217 | "below", // aroundTop's bottom-left corner with the popup's top-left corner (works) |
| 218 | "below-alt" // aroundTop's bottom-right corner with the popup's top-right corner (works) |
| 219 | ], true); |
| 220 | |
| 221 | doh.is("BL", ret.aroundCorner, "around corner"); |
| 222 | doh.is("TL", ret.corner, "popup's corner"); |
| 223 | doh.is("20px", popup.style.top, "underneath around node"); |
| 224 | doh.is(domGeometry.position(aroundTop).x+"px", popup.style.left, "left sides aligned"); |
| 225 | } |
| 226 | FAILED test: ../../dijit/tests/place.html::around::aroundT 14 ms |
| 227 | _AssertFailure: assertEqual() failed: |
| 228 | expected |
| 229 | 378.3999938964844 |
| 230 | but got |
| 231 | 378.3899841308594 |
| 232 | |
| 233 | with hint: |
| 234 | right sides aligned |
| 235 | |
| 236 | ERROR IN: |
| 237 | function aroundTooltip(t){ |
| 238 | // Same as above test except that shape of drop down changes depending on where it's positioned. |
| 239 | // Simulates tooltip placement (tooltip shape changes b/c of the arrow). |
| 240 | // Should pick the third choice this time |
| 241 | |
| 242 | function layoutNode(node, aroundCorner, nodeCorner){ |
| 243 | node.style.width = (nodeCorner == "TL" ? "5000px" : "75px"); |
| 244 | } |
| 245 | var ret = place.around(popup, aroundTop, [ |
| 246 | "above", // aroundTop's top-left corner with the popup's bottom-left corner (fails) |
| 247 | "below", // aroundTop's bottom-left corner with the popup's top-left corner (works) |
| 248 | "below-alt" // aroundTop's bottom-right corner with the popup's top-right corner (works) |
| 249 | ], true, layoutNode); |
| 250 | |
| 251 | doh.is("BR", ret.aroundCorner, "around corner"); |
| 252 | doh.is("TR", ret.corner, "popup's corner"); |
| 253 | doh.is("20px", popup.style.top, "underneath around node"); |
| 254 | doh.is(domGeometry.position(aroundTop).x+domGeometry.position(aroundTop).w, |
| 255 | domGeometry.position(popup).x+domGeometry.position(popup).w, |
| 256 | "right sides aligned"); |
| 257 | } |
| 258 | FAILED test: ../../dijit/tests/place.html::around::aroundTooltip 26 ms |
| 259 | PASSED test: ../../dijit/tests/place.html::around::aroundB 9 ms |
| 260 | _AssertFailure: assertEqual() failed: |
| 261 | expected |
| 262 | 566 |
| 263 | but got |
| 264 | 565.989990234375 |
| 265 | |
| 266 | with hint: |
| 267 | above around node |
| 268 | |
| 269 | ERROR IN: |
| 270 | function aroundBM(t){ |
| 271 | // bottom middle popup from "aroundBottom" node |
| 272 | var ret = place.around(popup, aroundBottom, [ |
| 273 | "above-centered", // aroundBottom's top-middle with the popup's bottom-middle (works) |
| 274 | "below-centered" // aroundBottom's bottom-middle with the popup's top-middle (fails) |
| 275 | ], true); |
| 276 | |
| 277 | doh.is("TM", ret.aroundCorner, "around middle"); |
| 278 | doh.is("BM", ret.corner, "popup's middle"); |
| 279 | var popupPos = domGeometry.position(popup); |
| 280 | var aroundPos = domGeometry.position(aroundBottom); |
| 281 | doh.is(aroundPos.y, popupPos.y + popupPos.h, "above around node"); |
| 282 | doh.t(aroundPos.x > popupPos.x, "starts before around node"); |
| 283 | doh.t(aroundPos.x < (popupPos.x + popupPos.w), "ends after around node"); |
| 284 | } |
| 285 | FAILED test: ../../dijit/tests/place.html::around::aroundBM 8 ms |
| 286 | PASSED test: ../../dijit/tests/place.html::around::aroundTM 12 ms |
| 287 | PASSED test: ../../dijit/tests/place.html::around::aroundML 9 ms |
| 288 | _AssertFailure: assertEqual() failed: |
| 289 | expected |
| 290 | 695.7899780273437 |
| 291 | but got |
| 292 | 695.7999877929687 |
| 293 | |
| 294 | with hint: |
| 295 | before around node |
| 296 | |
| 297 | ERROR IN: |
| 298 | function aroundMR(t){ |
| 299 | // middle left popup from "aroundRight" node |
| 300 | var ret = place.around(popup, aroundRight, [ |
| 301 | "after-centered", // aroundRight's middle-right with the popup's middle-left (fails) |
| 302 | "before-centered" // aroundRight's middle-left with the popup's middle-right (works) |
| 303 | ], true); |
| 304 | |
| 305 | doh.is("ML", ret.aroundCorner, "around middle"); |
| 306 | doh.is("MR", ret.corner, "popup's middle"); |
| 307 | var popupPos = domGeometry.position(popup); |
| 308 | var aroundPos = domGeometry.position(aroundRight); |
| 309 | doh.is(popupPos.x + popupPos.w, aroundPos.x, "before around node"); |
| 310 | doh.t(aroundPos.y > popupPos.y, "starts before around node"); |
| 311 | doh.t(aroundPos.y < (popupPos.y + popupPos.h), "ends after around node"); |
| 312 | } |
| 313 | FAILED test: ../../dijit/tests/place.html::around::aroundMR 9 ms |
| 314 | PASSED test: ../../dijit/tests/place.html::around::aroundMLB 9 ms |
| 315 | _AssertFailure: assertEqual() failed: |
| 316 | expected |
| 317 | 715.7899780273437 |
| 318 | but got |
| 319 | 715.7999877929687 |
| 320 | |
| 321 | with hint: |
| 322 | right aligned with around node |
| 323 | |
| 324 | ERROR IN: |
| 325 | function aroundMRT(t){ |
| 326 | // This will put the drop-down above the "aroundRight" node, first trying to left-align |
| 327 | // but since that doesn't work then trying to right-align. |
| 328 | var ret = place.around(popup, aroundRight, ["above"], true); |
| 329 | |
| 330 | doh.is("TR", ret.aroundCorner, "around right"); |
| 331 | doh.is("BR", ret.corner, "popup's right"); |
| 332 | var popupPos = domGeometry.position(popup); |
| 333 | var aroundPos = domGeometry.position(aroundRight); |
| 334 | doh.is(popupPos.x + popupPos.w, aroundPos.x + aroundPos.w, "right aligned with around node"); |
| 335 | doh.is(popupPos.y + popupPos.h, aroundPos.y, "above around node"); |
| 336 | } |
| 337 | FAILED test: ../../dijit/tests/place.html::around::aroundMRT 12 ms |
| 338 | PASSED test: ../../dijit/tests/place.html 503 ms |