// copied this from event-key-test.js to add tests for changing value by keyboard
if (type) {
if (type === 'keypress') {
} else {
}
} else {
}
};
// END copied this from event-key-test.js to add tests for changing value by keyboard
name: "Lifecycle",
setUp: function () {
},
tearDown: function () {
},
"test default construction": function () {
},
"test SliderBase construction": function () {
},
"test render(selector)": function () {
"<div></div>" + // block element
'<div class="floated" style="float:left"></div>' + // float
"<p></p>" + // limited block element
"<span></span>"); // inline element
p = Y.one("#testbed > p"),
},
"test render( node )": function () {
"<div></div>" + // block element
'<div class="floated" style="float:left"></div>' + // float
"<p></p>" + // limited block element
"<span></span>"); // inline element
p = Y.one("#testbed > p"),
},
"test render: selector attrib in constructor": function () {
"<div></div>" + // block element
'<div class="floated" style="float:left"></div>' + // float
"<p></p>" + // limited block element
"<span></span>"); // inline element
p = Y.one("#testbed > p"),
},
"test render: node attrib in constructor": function () {
"<div></div>" + // block element
'<div class="floated" style="float:left"></div>' + // float
"<p></p>" + // limited block element
"<span></span>"); // inline element
p = Y.one("#testbed > p"),
},
"test render off DOM": function () {
},
"test destroy() before render": function () {
},
"test destroy() after render off DOM": function () {
},
"test destroy() after render to DOM": function () {
}
}));
name: "API",
setUp: function () {
},
tearDown: function () {
},
"test getValue() and setValue(v) before render": function () {
var s = this.slider;
s.setValue(50);
s.setValue(3.3333);
// out of range constrained by setter
s.setValue(-10);
s.setValue(110);
},
"test getValue() and setValue(v) after render() to hidden container": function () {
s = this.slider;
s.setValue(50);
s.setValue(3.3333);
s.setValue(-10);
s.setValue(110);
},
"test getValue() and setValue(v) after render() to DOM": function () {
var s = this.slider;
s.render('#testbed');
s.setValue(50);
s.setValue(3.3333);
s.setValue(-10);
s.setValue(110);
},
"setValue(v) then render() should position thumb": function () {
var s = this.slider;
s.setValue(20);
s.render("#testbed");
},
"setValue(v) after render() should move the thumb": function () {
var s = this.slider;
s.render('#testbed');
s.setValue(20);
s.setValue(0);
s.setValue(100);
},
"setValue(v) when hidden should still move the thumb": function () {
var s = this.slider;
s.render('#testbed');
s.setValue(20);
}
}));
name: "Attributes",
_should: {
fail: {
// TODO This is a bug. invalid construction value should fallback
// to specified attribute default
"axis should only accept 'x', 'X', 'y', and 'Y'": true
}
},
setUp: function () {
},
tearDown: function () {
},
"test axis": function () {
},
"axis should be writeOnce": function () {
},
"axis should only accept 'x', 'X', 'y', and 'Y'": function () {
});
});
},
"test length": function () {
},
"thumbUrl should default at render()": function () {
},
"thumbUrl should default to sam skin": function () {
Y.Assert.areEqual( Y.config.base + 'slider-base/assets/skins/sam/thumb-x.png', slider.get('thumbUrl') );
},
"thumbUrl should default from the current skin": function () {
Y.Assert.areEqual( Y.config.base + 'slider-base/assets/skins/foo/thumb-x.png', slider.get('thumbUrl') );
},
"test clickableRail": function () {
},
"test min": function () {
},
"test max": function () {
},
"test value": function () {
}
}));
name: "Keyboard",
_should: {
fail: {
"test keyboard input and resultant value change, when Slider length is less than max - min": 2531498
}
},
setUp: function () {
},
tearDown: function () {
},
"test keyboard input": function () {
length: '350px',
min : 0,
max : 100,
value : 50
});
// beyond max
// min and beyond
},
/*
* This tests changing the value by one unit
* that would not move the slider a full pixel
* and because of ticket #2531498, was
* changing the value back to previous value
* to match the thumb position
*/
"test keyboard input and resultant value change, when Slider length is less than max - min": function () {
min : 0,
max : 100,
value : 0
});
},
"test ARIA attributes while values change by keyboard input": function () {
min : 0,
max : 100,
value : 50
});
}
}));
name: "Runtime expectations",
setUp: function () {
},
tearDown: function () {
},
"test ": function () {
}
}));
/*
suite.add( new Y.Test.Case({
name: "Bugs",
setUp: function () {
},
tearDown: function () {
},
"test ": function () {
}
}));
*/