Opened 13 years ago

Closed 11 years ago

#8884 closed task (fixed)

Slider: bump boundary tests indeterminate

Reported by: bill Owned by: Douglas Hays
Priority: high Milestone: 1.7
Component: Dijit - Form Version: 1.3.0b3
Keywords: dohfail Cc:
Blocked By: Blocking:


The a11yBoundaryTest and boundaryTest in Slider_a11y.html and Slider_mouse.html are indeterminate. I.E., they sometimes fail, due to a problem with the test.

Those two tests test the sliders to see that clicking the left/right button (or using the left/right arrow keys) moves the slider to it's min/max value. The first test, for example, sets the slider's value at 0.2 and then does a left arrow. This will move the slider to 0, unless the slider is very wide, in which case it will take two (or more) arrow clicks to move to zero. (NOTE: this fails on sliders where discreteValues is *not* specified.)

test_Slider.html defines the width of the first slider as style="width: 50%" which exacerbates the problem since it's different depending on your browser window. But, you can reproduce the problem by setting style="width: 764px".

A further complication is that setting style="width: 764px" means that the number of possible positions of the handle is less than 764, due to the width of the button nodes and margin/borders/etc.

So, ideally we should have tests for left and right arrow on sliders when discreteValues is not set, but it's hard to write them.

Change History (7)

comment:1 Changed 13 years ago by bill

Milestone: 1.4future

(In [17025]) Make slider1 narrower to avoid test failures on wide browser window. We still don't have a good test though for when discreteValues is *not* specified (i.e a test to make sure that the arrow keys move up/down 1 pixel), so leaving ticket open. Refs #8884.

comment:2 Changed 11 years ago by bill

Component: DijitDijit - Form
Owner: set to Douglas Hays

comment:3 Changed 11 years ago by bill

Keywords: dohfail added

comment:4 Changed 11 years ago by Douglas Hays

Milestone: future1.7
Status: newassigned

comment:5 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

In [26372]:

Fixes #8884. Fix no-discrete value tests to work with varying slider sizes.

comment:6 Changed 11 years ago by bill

Resolution: fixed
Status: closedreopened

Starting with [26732] I'm getting a failure in Spinner_mouse.html on FF5 and FF6 on windows:

GROUP "drag tests" has 1 test to run
dojo.js (line 633)
_AssertFailure: doh._AssertFailure: assertEqual() failed: expected 100.13003901170352 but got 100 with hint: Expected max value of 100, got 100.13003901170352
dojo.js (line 633)
console.error(, " "))
ERROR IN: (function () {var d = new doh.Deferred;var slider = dijit.byId("slider1");slider.set("value", 50);dojo.window.scrollIntoView(slider.domNode);doh.robot.mouseMoveAt(slider.focusNode, 1, 0);doh.robot.mousePress({left: true}, 500);doh.robot.mouseMoveAt(slider.incrementButton, 1000, 0);doh.robot.mouseRelease({left: true}, 500);doh.robot.mouseMoveAt(slider.decrementButton, 1000, 0);doh.robot.sequence(d.getTestCallback(function () {var value = slider.get("value");, 100, "Expected max value of 100, got " + value);}), 1000);return d;})
dojo.js (line 633)
FAILED test: horizontal 4308 ms
dojo.js (line 633)
Last edited 11 years ago by bill (previous) (diff)

comment:7 Changed 11 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

In [26474]:

Fixes #8884. Firefox's fractional pixel values was playing havoc with Slider value calculations with very specific (unlucky) widget domNode sizes.

Note: See TracTickets for help on using tickets.