< prev index next >
functional/ControlsTests/test/javafx/scene/control/test/textinput/TextAreaPropertiesTest.java
Print this page
@@ -75,22 +75,22 @@
private void commonScrollLeftTopTest(Orientation orientation, TextControlTestBase.Properties property, String screenShotName) throws InterruptedException, Throwable {
setSize(200, 200);
addText();
//There are both scrollBars must exist
- assertEquals(getScrollBarValue(findScrollBar(testedControl.as(Parent.class, Node.class), orientation, true)), 0, 0);
+ assertEquals(getScrollBarValue(findScrollBar((Parent<Node>)testedControl.as(Parent.class, Node.class), orientation, true)), 0, 0);
double[] values = {10, 0, 50, 0, 100};
setPropertyBySlider(SettingType.BIDIRECTIONAL, property, 10);
- double item = getScrollBarValue(findScrollBar(testedControl.as(Parent.class, Node.class), orientation, true)) / 10;
+ double item = getScrollBarValue(findScrollBar((Parent<Node>)testedControl.as(Parent.class, Node.class), orientation, true)) / 10;
for (SettingType type : EnumSet.of(SettingType.BIDIRECTIONAL, SettingType.SETTER, SettingType.UNIDIRECTIONAL)) {
for (double value : values) {
setPropertyBySlider(type, property, value);
checkTextFieldValue(property, value);
- assertEquals(getScrollBarValue(findScrollBar(testedControl.as(Parent.class, Node.class), orientation, true)), value * item, 0.1 * item);
+ assertEquals(getScrollBarValue(findScrollBar((Parent<Node>)testedControl.as(Parent.class, Node.class), orientation, true)), value * item, 0.1 * item);
}
}
checkScreenshot(screenShotName + "On" + values[values.length - 1] + "Pixels", testedControl);
throwScreenshotError();
@@ -131,17 +131,17 @@
setPropertyByTextField(SettingType.BIDIRECTIONAL, Properties.text, text);
for (SettingType type : EnumSet.of(SettingType.BIDIRECTIONAL, SettingType.SETTER, SettingType.UNIDIRECTIONAL)) {
setPropertyByToggleClick(type, Properties.wraptext);//true//bind
checkTextFieldText(Properties.wraptext, "true");//getter
- Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null);//behavior
- Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);//behavior
+ Assert.assertFalse(findScrollBar((Parent<Node>)testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, false) == null);//behavior
+ Assert.assertFalse(findScrollBar((Parent<Node>)testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, true) == null);//behavior
setPropertyByToggleClick(type, Properties.wraptext);//false//bind
checkTextFieldText(Properties.wraptext, "false");//getter
- Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);//behavior
- Assert.assertFalse(findScrollBar(testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null);//behavior
+ Assert.assertFalse(findScrollBar((Parent<Node>)testedControl.as(Parent.class, Node.class), Orientation.HORIZONTAL, true) == null);//behavior
+ Assert.assertFalse(findScrollBar((Parent<Node>)testedControl.as(Parent.class, Node.class), Orientation.VERTICAL, false) == null);//behavior
}
}
/**
* Test checks, that if control is focused and text is selected, it is blue,
< prev index next >