< prev index next >
functional/ControlsTests/test/javafx/scene/control/test/ScrollPane/ScrollPaneTest.java
Print this page
*** 75,103 ****
@Smoke
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.vmax.DEFAULT", "javafx.scene.control.ScrollPane.vmax.GET"}, level = Level.FULL)
public void checkVMaxOptionTest() throws InterruptedException {
Assert.assertEquals((new ScrollPane()).vmaxProperty().getValue(), 1, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vmax, 200);
checkTextFieldValue(Properties.vmax, 200);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vvalue, 200);
checkTextFieldValue(Properties.vvalue, 200);
! Wrap<? extends ScrollBar> sb1 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
sb1.as(AbstractScroll.class).to(0);
checkTextFieldValue(Properties.vvalue, 0);
! Wrap<? extends ScrollBar> sb2 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
sb2.as(AbstractScroll.class).to(200);
checkTextFieldValue(Properties.vvalue, 200);
! findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(-1 * (Utils.isMacOS() ? -1 : 1));
! findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1 * (Utils.isMacOS() ? -1 : 1));
checkTextFieldValue(Properties.vvalue, 200);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.vmax, 150);
checkTextFieldValue(Properties.vmax, 150);
--- 75,106 ----
@Smoke
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.vmax.DEFAULT", "javafx.scene.control.ScrollPane.vmax.GET"}, level = Level.FULL)
public void checkVMaxOptionTest() throws InterruptedException {
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
Assert.assertEquals((new ScrollPane()).vmaxProperty().getValue(), 1, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vmax, 200);
checkTextFieldValue(Properties.vmax, 200);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vvalue, 200);
checkTextFieldValue(Properties.vvalue, 200);
! Wrap<? extends ScrollBar> sb1 = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
sb1.as(AbstractScroll.class).to(0);
checkTextFieldValue(Properties.vvalue, 0);
! Wrap<? extends ScrollBar> sb2 = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
sb2.as(AbstractScroll.class).to(200);
checkTextFieldValue(Properties.vvalue, 200);
! findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(-1 * (Utils.isMacOS() ? -1 : 1));
! findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1 * (Utils.isMacOS() ? -1 : 1));
checkTextFieldValue(Properties.vvalue, 200);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.vmax, 150);
checkTextFieldValue(Properties.vmax, 150);
*** 107,135 ****
@Smoke
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.vmin.DEFAULT", "javafx.scene.control.ScrollPane.vmin.GET"}, level = Level.FULL)
public void checkVMinOptionTest() throws InterruptedException {
Assert.assertEquals((new ScrollPane()).vminProperty().getValue(), 0, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vmin, -100);
checkTextFieldValue(Properties.vmin, -100);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vvalue, -100);
checkTextFieldValue(Properties.vvalue, -100);
! Wrap<? extends ScrollBar> sb1 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
sb1.as(AbstractScroll.class).to(1);
checkTextFieldValue(Properties.vvalue, 1);
! Wrap<? extends ScrollBar> sb2 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
sb2.as(AbstractScroll.class).to(-100);
checkTextFieldValue(Properties.vvalue, -100);
! findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1 * (Utils.isMacOS() ? -1 : 1));
! findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(-1 * (Utils.isMacOS() ? -1 : 1));
checkTextFieldValue(Properties.vvalue, -100);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.vmin, -50);
checkTextFieldValue(Properties.vmin, -50);
--- 110,141 ----
@Smoke
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.vmin.DEFAULT", "javafx.scene.control.ScrollPane.vmin.GET"}, level = Level.FULL)
public void checkVMinOptionTest() throws InterruptedException {
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
Assert.assertEquals((new ScrollPane()).vminProperty().getValue(), 0, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vmin, -100);
checkTextFieldValue(Properties.vmin, -100);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vvalue, -100);
checkTextFieldValue(Properties.vvalue, -100);
! Wrap<? extends ScrollBar> sb1 = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
sb1.as(AbstractScroll.class).to(1);
checkTextFieldValue(Properties.vvalue, 1);
! Wrap<? extends ScrollBar> sb2 = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
sb2.as(AbstractScroll.class).to(-100);
checkTextFieldValue(Properties.vvalue, -100);
! findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(+1 * (Utils.isMacOS() ? -1 : 1));
! findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).mouse().turnWheel(-1 * (Utils.isMacOS() ? -1 : 1));
checkTextFieldValue(Properties.vvalue, -100);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.vmin, -50);
checkTextFieldValue(Properties.vmin, -50);
*** 139,167 ****
@Smoke
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.hmax.DEFAULT", "javafx.scene.control.ScrollPane.hmax.GET"}, level = Level.FULL)
public void checkHMaxOptionTest() throws InterruptedException {
Assert.assertEquals((new ScrollPane()).hmaxProperty().getValue(), 1, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmax, 200);
checkTextFieldValue(Properties.hmax, 200);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, 200);
checkTextFieldValue(Properties.hvalue, 200);
! Wrap<? extends ScrollBar> sb1 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
sb1.as(AbstractScroll.class).to(0);
checkTextFieldValue(Properties.hvalue, 0);
! Wrap<? extends ScrollBar> sb2 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
sb2.as(AbstractScroll.class).to(200);
checkTextFieldValue(Properties.hvalue, 200);
! findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(-1);
! findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1);
checkTextFieldValue(Properties.hvalue, 200);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.hmax, 150);
checkTextFieldValue(Properties.hmax, 150);
--- 145,176 ----
@Smoke
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.hmax.DEFAULT", "javafx.scene.control.ScrollPane.hmax.GET"}, level = Level.FULL)
public void checkHMaxOptionTest() throws InterruptedException {
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
Assert.assertEquals((new ScrollPane()).hmaxProperty().getValue(), 1, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmax, 200);
checkTextFieldValue(Properties.hmax, 200);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, 200);
checkTextFieldValue(Properties.hvalue, 200);
! Wrap<? extends ScrollBar> sb1 = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
sb1.as(AbstractScroll.class).to(0);
checkTextFieldValue(Properties.hvalue, 0);
! Wrap<? extends ScrollBar> sb2 = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
sb2.as(AbstractScroll.class).to(200);
checkTextFieldValue(Properties.hvalue, 200);
! findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(-1);
! findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1);
checkTextFieldValue(Properties.hvalue, 200);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.hmax, 150);
checkTextFieldValue(Properties.hmax, 150);
*** 171,199 ****
@Smoke
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.hmin.DEFAULT", "javafx.scene.control.ScrollPane.hmin.GET"}, level = Level.FULL)
public void checkHMinOptionTest() throws InterruptedException {
Assert.assertEquals((new ScrollPane()).vminProperty().getValue(), 0, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmin, -100);
checkTextFieldValue(Properties.hmin, -100);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, -100);
checkTextFieldValue(Properties.hvalue, -100);
! Wrap<? extends ScrollBar> sb1 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
sb1.as(AbstractScroll.class).to(1);
checkTextFieldValue(Properties.hvalue, 1);
! Wrap<? extends ScrollBar> sb2 = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
sb2.as(AbstractScroll.class).to(-100);
checkTextFieldValue(Properties.hvalue, -100);
! findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1);
! findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(-1);
checkTextFieldValue(Properties.hvalue, -100);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.hmin, -50);
checkTextFieldValue(Properties.hmin, -50);
--- 180,211 ----
@Smoke
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.hmin.DEFAULT", "javafx.scene.control.ScrollPane.hmin.GET"}, level = Level.FULL)
public void checkHMinOptionTest() throws InterruptedException {
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
Assert.assertEquals((new ScrollPane()).vminProperty().getValue(), 0, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmin, -100);
checkTextFieldValue(Properties.hmin, -100);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, -100);
checkTextFieldValue(Properties.hvalue, -100);
! Wrap<? extends ScrollBar> sb1 = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
sb1.as(AbstractScroll.class).to(1);
checkTextFieldValue(Properties.hvalue, 1);
! Wrap<? extends ScrollBar> sb2 = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
sb2.as(AbstractScroll.class).to(-100);
checkTextFieldValue(Properties.hvalue, -100);
! findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(+1);
! findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).mouse().turnWheel(-1);
checkTextFieldValue(Properties.hvalue, -100);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.hmin, -50);
checkTextFieldValue(Properties.hmin, -50);
*** 205,214 ****
--- 217,229 ----
@Test(timeout = 300000)
public void checkH_V_ValueOptionTest() throws InterruptedException, Throwable {
Assert.assertEquals((new ScrollPane()).hvalueProperty().getValue(), 0, commonComparePrecision);
Assert.assertEquals((new ScrollPane()).vvalueProperty().getValue(), 0, commonComparePrecision);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, 200);
checkTextFieldValue(Properties.hvalue, 1);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.vvalue, 200);
checkTextFieldValue(Properties.vvalue, 1);
*** 226,240 ****
public void checkPrefViewPortHeightOptionTest() throws InterruptedException {
Assert.assertEquals((new ScrollPane()).prefViewportHeightProperty().getValue(), 0, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 150);
checkTextFieldValue(Properties.prefViewportHeight, 150);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.prefViewportHeight, 230);
checkTextFieldValue(Properties.prefViewportHeight, 230);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null);
}
/**
* Assume, that scrollPane contain rectangle 200X200 pixels
*/
--- 241,255 ----
public void checkPrefViewPortHeightOptionTest() throws InterruptedException {
Assert.assertEquals((new ScrollPane()).prefViewportHeightProperty().getValue(), 0, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 150);
checkTextFieldValue(Properties.prefViewportHeight, 150);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.prefViewportHeight, 230);
checkTextFieldValue(Properties.prefViewportHeight, 230);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null);
}
/**
* Assume, that scrollPane contain rectangle 200X200 pixels
*/
*** 244,258 ****
public void checkPrefViewPortWidthOptionTest() throws InterruptedException {
Assert.assertEquals((new ScrollPane()).prefViewportWidthProperty().getValue(), 0, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 150);
checkTextFieldValue(Properties.prefViewportWidth, 150);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.prefViewportWidth, 230);
checkTextFieldValue(Properties.prefViewportWidth, 230);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null);
}
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.prefViewportWidth.GET", "javafx.scene.control.ScrollPane.prefViewportWidth.DEFAULT"}, level = Level.FULL)
public void checkMinViewPortWidthSetTest() throws InterruptedException {
--- 259,273 ----
public void checkPrefViewPortWidthOptionTest() throws InterruptedException {
Assert.assertEquals((new ScrollPane()).prefViewportWidthProperty().getValue(), 0, commonComparePrecision);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 150);
checkTextFieldValue(Properties.prefViewportWidth, 150);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);
setPropertyBySlider(SettingType.UNIDIRECTIONAL, Properties.prefViewportWidth, 230);
checkTextFieldValue(Properties.prefViewportWidth, 230);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null);
}
@Test(timeout = 300000)
@Covers(value = {"javafx.scene.control.ScrollPane.prefViewportWidth.GET", "javafx.scene.control.ScrollPane.prefViewportWidth.DEFAULT"}, level = Level.FULL)
public void checkMinViewPortWidthSetTest() throws InterruptedException {
*** 319,330 ****
INSIDEOUT, OUTSIDEIN
};
private void checkScrollbarsVisibility(boolean horizontalVisible, boolean verticalVisible) {
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, horizontalVisible) == null);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, verticalVisible) == null);
}
@Smoke
@Test(timeout = 300000)//RT-17395
@Covers(value = {"javafx.scene.control.ScrollPane.vbarPolicy.GET", "javafx.scene.control.ScrollPane.vbarPolicy.DEFAULT",
--- 334,345 ----
INSIDEOUT, OUTSIDEIN
};
private void checkScrollbarsVisibility(boolean horizontalVisible, boolean verticalVisible) {
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, horizontalVisible) == null);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, verticalVisible) == null);
}
@Smoke
@Test(timeout = 300000)//RT-17395
@Covers(value = {"javafx.scene.control.ScrollPane.vbarPolicy.GET", "javafx.scene.control.ScrollPane.vbarPolicy.DEFAULT",
*** 370,380 ****
switch (policy) {
case ALWAYS:
checkScrollbarsVisibility(true, true);
break;
case AS_NEEDED:
! checkScrollbarsVisibility(true, true);
break;
case NEVER:
checkScrollbarsVisibility(false, false);
break;
}
--- 385,395 ----
switch (policy) {
case ALWAYS:
checkScrollbarsVisibility(true, true);
break;
case AS_NEEDED:
! checkScrollbarsVisibility(false, false);
break;
case NEVER:
checkScrollbarsVisibility(false, false);
break;
}
*** 400,409 ****
--- 415,427 ----
}
@ScreenshotCheck
@Test(timeout = 300000)
public void dynamicContentChangingTest() throws Throwable {
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
changeContent();
//If content has really changed, button will be searchable.
//If content didn't change, button won't be on scene.
clickContentButton();
*** 441,452 ****
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, size);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, size * 2);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, size * 2);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);
Point controlSize = new GetAction<Point>() {
@Override
public void run(Object... os) throws Exception {
setResult(new Point(((ScrollPane) os[0]).getWidth(), ((ScrollPane) os[0]).getHeight()));
--- 459,470 ----
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, size);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, size * 2);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, size * 2);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);
Point controlSize = new GetAction<Point>() {
@Override
public void run(Object... os) throws Exception {
setResult(new Point(((ScrollPane) os[0]).getWidth(), ((ScrollPane) os[0]).getHeight()));
*** 458,478 ****
public void run(Object... os) throws Exception {
setResult(new Point(((ScrollPane) os[0]).getPrefViewportWidth(), ((ScrollPane) os[0]).getPrefViewportHeight()));
}
}.dispatch(Root.ROOT.getEnvironment(), testedControl.getControl());
! double verticalScrollBarWidth = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).getScreenBounds().width;
! double horizontalScrollBarHeight = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).getScreenBounds().height;
Assert.assertEquals(viewPortSize.x + verticalScrollBarWidth, controlSize.x, commonComparePrecision);
Assert.assertEquals(viewPortSize.y + horizontalScrollBarHeight, controlSize.y, commonComparePrecision);
}
}
@ScreenshotCheck
@Test(timeout = 300000)
public void whiteGapTest() throws InterruptedException, Throwable {
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmax, 200);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmin, 50);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, 200);
checkScreenshot("ScrollPane_WhiteGapTest", testedControl);
--- 476,499 ----
public void run(Object... os) throws Exception {
setResult(new Point(((ScrollPane) os[0]).getPrefViewportWidth(), ((ScrollPane) os[0]).getPrefViewportHeight()));
}
}.dispatch(Root.ROOT.getEnvironment(), testedControl.getControl());
! double verticalScrollBarWidth = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).getScreenBounds().width;
! double horizontalScrollBarHeight = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).getScreenBounds().height;
Assert.assertEquals(viewPortSize.x + verticalScrollBarWidth, controlSize.x, commonComparePrecision);
Assert.assertEquals(viewPortSize.y + horizontalScrollBarHeight, controlSize.y, commonComparePrecision);
}
}
@ScreenshotCheck
@Test(timeout = 300000)
public void whiteGapTest() throws InterruptedException, Throwable {
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmax, 200);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hmin, 50);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.hvalue, 200);
checkScreenshot("ScrollPane_WhiteGapTest", testedControl);
*** 487,496 ****
--- 508,520 ----
}
@ScreenshotCheck
@Test(timeout = 300000)//RT-17350
public void immediateHVBarPoliticApplyingTest() throws Throwable {
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, ScrollPane.ScrollBarPolicy.ALWAYS, Properties.hbarPolicy);
setPropertyByChoiceBox(SettingType.BIDIRECTIONAL, ScrollPane.ScrollBarPolicy.NEVER, Properties.hbarPolicy);
//There must not be horizontal bar.
checkScreenshot("ScrollPane_PoliticApplyingTest", testedControl);
*** 529,538 ****
--- 553,565 ----
}
@ScreenshotCheck
@Test(timeout = 300000)
public void insideTraversalCheckTest() throws Throwable {
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, 100);
+ setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, 100);
+
changeContent();
clickContentButton();
Wrap<? extends Button> buttonWrap = parent.lookup(Button.class, new ByID<Button>(CONTENT_BUTTON)).wrap();
buttonWrap.mouse().click();
*** 560,577 ****
SettingOption temp = currentSettingOption;
currentSettingOption = SettingOption.PROGRAM;
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 201);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 201);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 200);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 200);
! Assert.assertTrue(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) != null);
! Assert.assertTrue(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) != null);
currentSettingOption = temp;
}
@Smoke
--- 587,604 ----
SettingOption temp = currentSettingOption;
currentSettingOption = SettingOption.PROGRAM;
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 201);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 201);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 200);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 200);
! Assert.assertTrue(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) != null);
! Assert.assertTrue(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) != null);
currentSettingOption = temp;
}
@Smoke
*** 719,730 ****
//Test//Switched off, because developers don't fix such bugs.
public void steadyScrollingTest() throws InterruptedException {
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 100);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 100);
! Wrap<? extends ScrollBar> vertical = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
! Wrap<? extends ScrollBar> horizontal = findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
ScrollingChecker scV = new ScrollingChecker(vertical.getControl().valueProperty());
ScrollingChecker scH = new ScrollingChecker(horizontal.getControl().valueProperty());
for (int i = 0; i < 10; i++) {
vertical.mouse().turnWheel(+1);
--- 746,757 ----
//Test//Switched off, because developers don't fix such bugs.
public void steadyScrollingTest() throws InterruptedException {
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportHeight, 100);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, 100);
! Wrap<? extends ScrollBar> vertical = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true);
! Wrap<? extends ScrollBar> horizontal = findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true);
ScrollingChecker scV = new ScrollingChecker(vertical.getControl().valueProperty());
ScrollingChecker scH = new ScrollingChecker(horizontal.getControl().valueProperty());
for (int i = 0; i < 10; i++) {
vertical.mouse().turnWheel(+1);
*** 763,774 ****
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, size);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, size * 2);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, size * 2);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);
! Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);
Bounds bounds = new GetAction<Bounds>() {
@Override
public void run(Object... os) throws Exception {
setResult(((ScrollPane) os[0]).getViewportBounds());
--- 790,801 ----
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefViewportWidth, size);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefHeight, size * 2);
setPropertyBySlider(SettingType.BIDIRECTIONAL, Properties.prefWidth, size * 2);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);
! Assert.assertFalse(findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);
Bounds bounds = new GetAction<Bounds>() {
@Override
public void run(Object... os) throws Exception {
setResult(((ScrollPane) os[0]).getViewportBounds());
*** 780,791 ****
public void run(Object... os) throws Exception {
setResult(new Point(((ScrollPane) os[0]).getPrefViewportWidth(), ((ScrollPane) os[0]).getPrefViewportHeight()));
}
}.dispatch(Root.ROOT.getEnvironment(), testedControl.getControl());
! Assert.assertEquals(viewPortSize.x, bounds.getWidth() + findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).getScreenBounds().getWidth(), commonComparePrecision);
! Assert.assertEquals(viewPortSize.y, bounds.getHeight() + findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).getScreenBounds().getHeight(), commonComparePrecision);
}
}
@Ignore //due to http://javafx-jira.kenai.com/browse/RT-27467
@Smoke
--- 807,818 ----
public void run(Object... os) throws Exception {
setResult(new Point(((ScrollPane) os[0]).getPrefViewportWidth(), ((ScrollPane) os[0]).getPrefViewportHeight()));
}
}.dispatch(Root.ROOT.getEnvironment(), testedControl.getControl());
! Assert.assertEquals(viewPortSize.x, bounds.getWidth() + findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true).getScreenBounds().getWidth(), commonComparePrecision);
! Assert.assertEquals(viewPortSize.y, bounds.getHeight() + findScrollBar((Parent<Node>) testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true).getScreenBounds().getHeight(), commonComparePrecision);
}
}
@Ignore //due to http://javafx-jira.kenai.com/browse/RT-27467
@Smoke
< prev index next >