Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#10307 closed defect (fixed)

dijit/tests/editor/robot/Editor_mouse.html fails on FF3.0, 3.5. DOH Robot position issue

Reported by: Jared Jurkiewicz Owned by: Douglas Hays
Priority: high Milestone: 1.4
Component: TestFramework Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:


dijit/tests/editor/robot/Editor_mouse.html fails on FF3.0, 3.5. DOH Robot position issue

When that test runs on FF 3.X, it fails in the third test 'delete bold tag'.

_AssertFailure: doh._AssertFailure: assertEqual() failed: expected hello. <i>how are you</i>? but got hello<b>orld</b>. <i>how are you</i>? bootstrap.js (line 799)

doh._AssertFailurebootstrap.js (line 799) ERROR IN: (function () {var d = new (doh.Deferred);var bold = dojo.query("b", editor1.editNode);if (!bold.length) {bold = dojo.query("strong", editor1.editNode);}var size = dojo.withGlobal(editor1.window, function () {return dojo.position(bold[0]);});console.log(size);doh.robot.mouseMoveAt(bold[0], 500, 100, 5, 5);doh.robot.mouseClick({left: true}, 500);doh.robot.mouseClick({left: true}, 50);doh.robot.keyPress(dojo.keys.DELETE, 500);if (!dojo.isSafari && !dojo.isChrome) {doh.robot.keyPress(dojo.keys.BACKSPACE, 500);}doh.robot.sequence(d.getTestCallback(function () {"hello. <i>how are you</i>?", normalize(editor1.attr("value")));}), 500);return d;})bootstrap.js (line 799) Total time for GROUP " toolbar buttons " is 4 msbootstrap.js (line 799) FAILED test: delete bold tag 15 ms

This is because the call: doh.robot.mouseMoveAt(bold[0],500,100, 5, 5);

Positions the mouse 10 px (or so) below the bolded text. The double-click then does not actually select the bold text. So the backspace to delete it doesn't delete it ... and the test then fails its assertion.

This appears to be a robot issue with dom node position calculation in an iframe, as maqnually doing the test works fine (and thus validates the editor is working right, it's just the testcase itself that fails.).

Change History (3)

comment:1 Changed 10 years ago by Douglas Hays

Owner: changed from haysmark to Douglas Hays
Status: newassigned

comment:2 Changed 10 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [20759]) Fixes #10307 !strict. Change the 1em padding/-1em margin trick to remove an unnecessary Editor scrollbar to 1px/-1px since it seems to work the same and doesn't cause dojo.position to be off on FF3.

comment:3 Changed 10 years ago by bill

(In [20762]) Test comments, refs #10307.

Note: See TracTickets for help on using tickets.