* offset size. All other browser need to suffer alongside.
*/
- boolean newOffsetSizeIsGreaterThanScrollSize = px > getOffsetSize();
+ boolean newOffsetSizeIsGreaterThanScrollSize = px > getScrollSize();
boolean offsetSizeBecomesGreaterThanScrollSize = showsScrollHandle()
&& newOffsetSizeIsGreaterThanScrollSize;
if (offsetSizeBecomesGreaterThanScrollSize && getScrollPos() != 0) {
getGridVerticalScrollbar());
}
+ protected int getGridVerticalScrollPos() {
+ return ((Number) executeScript("return arguments[0].scrollTop",
+ getGridVerticalScrollbar())).intValue();
+ }
+
protected List<TestBenchElement> getGridHeaderRowCells() {
List<TestBenchElement> headerCells = new ArrayList<TestBenchElement>();
for (int i = 0; i < getGridElement().getHeaderCount(); ++i) {
assertTrue(vscrollStyleName.contains(stylename + "-scroller"));
assertTrue(vscrollStyleName.contains(stylename + "-scroller-vertical"));
}
+
+ @Test
+ public void testScrollPosDoesNotChangeAfterStateChange() {
+ openTestURL();
+ scrollGridVerticallyTo(1000);
+ int scrollPos = getGridVerticalScrollPos();
+ selectMenuPath("Component", "Editor", "Enabled");
+ assertEquals("Scroll position should've not have changed", scrollPos,
+ getGridVerticalScrollPos());
+ }
}