Skip to content

Commit

Permalink
8255241: [TestBug] Re-enable few ignored tests in javafx.controls mod…
Browse files Browse the repository at this point in the history
…ule that pass with latest code

Reviewed-by: kcr
  • Loading branch information
aghaisas committed Oct 23, 2020
1 parent 4e5f0e6 commit 243b1a5
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 32 deletions.
Expand Up @@ -30,5 +30,7 @@ public static void setTableView(TableColumn tc, TableView tv) {
tc.setTableView(tv);
}


public static final double DEFAULT_WIDTH = TableColumnBase.DEFAULT_WIDTH;
public static final double DEFAULT_MIN_WIDTH = TableColumnBase.DEFAULT_MIN_WIDTH;
public static final double DEFAULT_MAX_WIDTH = TableColumnBase.DEFAULT_MAX_WIDTH;
}
Expand Up @@ -32,7 +32,6 @@
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.chart.XYChartShim;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
Expand All @@ -49,7 +48,6 @@ public class XYChartDataTest {
assertEquals(20, XYChartShim.Data_getCurrentY(data).longValue());
}

@Ignore("Waiting on fix for RT-13478")
@Test public void updatingValuesBeforeAddingToASeriesShouldUpdateValuesAndCurrentValues() {
XYChart.Data<Number,Number> data = new XYChart.Data<Number,Number>(10, 20);
data.setXValue(100);
Expand Down
Expand Up @@ -567,7 +567,6 @@ public class LabeledTest {
assertEquals(r, labeled.getGraphic());
}

@Ignore ("CSS Graphic must be a URL, and then it will try to load the image. Not sure how to test.")
@Test public void whenGraphicIsBound_CssMetaData_isSettable_ReturnsFalse() {
CssMetaData styleable = ((StyleableProperty)labeled.graphicProperty()).getCssMetaData();
assertTrue(styleable.isSettable(labeled));
Expand All @@ -577,7 +576,6 @@ public class LabeledTest {
assertFalse(styleable.isSettable(labeled));
}

@Ignore ("CSS Graphic must be a URL, and then it will try to load the image. Not sure how to test.")
@Test public void whenGraphicIsSpecifiedViaCSSAndIsNotBound_CssMetaData_isSettable_ReturnsTrue() {
CssMetaData styleable = ((StyleableProperty)labeled.graphicProperty()).getCssMetaData();
assertTrue(styleable.isSettable(labeled));
Expand Down
Expand Up @@ -39,7 +39,6 @@
import javafx.scene.control.MultipleSelectionModelBaseShim;
import javafx.scene.control.SelectionMode;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import static javafx.scene.control.ControlShim.*;
Expand Down Expand Up @@ -490,7 +489,7 @@ protected void assertInRangeState(int index) {
assertFalse(other.isSelected());
}

@Ignore @Test public void replacingTheSelectionModelRemovesTheListenerFromTheOldModel() {
@Test public void replacingTheSelectionModelRemovesTheListenerFromTheOldModel() {
cell.updateIndex(0);
cell.updateListView(list);
MultipleSelectionModel<String> sm = list.getSelectionModel();
Expand Down
Expand Up @@ -733,7 +733,6 @@ private void show() {
assertEquals(tab1, tabPane.getSelectionModel().getSelectedItem());
}

@Ignore
@Test public void mousePressSelectsATab_RT20476() {
tabPane.getTabs().add(tab1);
tabPane.getTabs().add(tab2);
Expand Down Expand Up @@ -765,7 +764,6 @@ private void show() {
}

private int counter = 0;
@Ignore
@Test public void setOnSelectionChangedFiresTwice_RT21089() {
tabPane.getTabs().add(tab1);
tabPane.getTabs().add(tab2);
Expand Down
Expand Up @@ -53,7 +53,6 @@


import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

/**
Expand Down Expand Up @@ -443,11 +442,6 @@ public class TabTest {
tab.setTooltip(tt);
assertSame(tab.getTooltip(), tt);
}
@Ignore("The following test is incomplete with no proper sense.")
@Test public void checkEventDispatcherChain() {
EventDispatchChain chain = new EventDispatchChainImpl();
tab.buildEventDispatchChain(chain);
}

@Test public void setDisableAndSeeValue() {
tab.setDisable(true);
Expand Down
Expand Up @@ -60,7 +60,6 @@

import test.com.sun.javafx.scene.control.test.Person;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import static org.junit.Assert.*;
Expand Down Expand Up @@ -462,10 +461,9 @@ public class TableColumnTest {
* minWidth Tests *
***************************************************************************/

@Ignore ("Fails with hardcoded value of 10")
@Test public void minWidthIs_USE_COMPUTED_SIZE_ByDefault() {
assertEquals(Control.USE_COMPUTED_SIZE, column.getMinWidth(), 0);
assertEquals(Control.USE_COMPUTED_SIZE, column.minWidthProperty().get(), 0);
@Test public void minWidthIs_DEFAULT_MIN_WIDTH_ByDefault() {
assertEquals(TableColumnShim.DEFAULT_MIN_WIDTH, column.getMinWidth(), 0);
assertEquals(TableColumnShim.DEFAULT_MIN_WIDTH, column.minWidthProperty().get(), 0);
}

@Test public void minWidthCanBeSet() {
Expand Down Expand Up @@ -494,10 +492,9 @@ public class TableColumnTest {
* maxWidth Tests *
***************************************************************************/

@Ignore ("Fails with hardcoded value of 5000")
@Test public void maxWidthIs_USE_COMPUTED_SIZE_ByDefault() {
assertEquals(Control.USE_COMPUTED_SIZE, column.getMaxWidth(), 0);
assertEquals(Control.USE_COMPUTED_SIZE, column.maxWidthProperty().get(), 0);
@Test public void maxWidthIs_DEFAULT_MAX_WIDTH_ByDefault() {
assertEquals(TableColumnShim.DEFAULT_MAX_WIDTH, column.getMaxWidth(), 0);
assertEquals(TableColumnShim.DEFAULT_MAX_WIDTH, column.maxWidthProperty().get(), 0);
}

@Test public void maxWidthCanBeSet() {
Expand Down Expand Up @@ -526,10 +523,9 @@ public class TableColumnTest {
* prefWidth Tests *
***************************************************************************/

@Ignore ("Fails with hardcoded value of 80")
@Test public void prefWidthIs_USE_COMPUTED_SIZE_ByDefault() {
assertEquals(Control.USE_COMPUTED_SIZE, column.getPrefWidth(), 0);
assertEquals(Control.USE_COMPUTED_SIZE, column.prefWidthProperty().get(), 0);
@Test public void prefWidthIs_DEFAULT_WIDTH_ByDefault() {
assertEquals(TableColumnShim.DEFAULT_WIDTH, column.getPrefWidth(), 0);
assertEquals(TableColumnShim.DEFAULT_WIDTH, column.prefWidthProperty().get(), 0);
}

@Test public void prefWidthCanBeSet() {
Expand Down Expand Up @@ -1123,7 +1119,6 @@ public void defaultOnEditCommitHandlerDealsWithNullTablePosition() {
assertSame(wilma, items.get(2));
}

@Ignore("This started failing when I upgraded to Java 7")
@Test public void sortingMixOfComparableAndNonComparable() {
Person fred = new Person("Fred", 36);
Person wilma = new Person("Wilma", 34);
Expand Down
Expand Up @@ -36,7 +36,6 @@
import javafx.scene.control.TextInputControlShim;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

import static test.com.sun.javafx.scene.control.infrastructure.ControlTestUtils.*;
Expand Down Expand Up @@ -193,7 +192,6 @@ private void removeUncaughtExceptionHandler() {
assertTrue("PromptText cannot be bound", txtArea.getPromptText().equals("newvalue"));
}

@Ignore("TODO: Please remove ignore annotation after RT-15799 is fixed.")
@Test public void checkTextPropertyBind() {
StringProperty strPr = new SimpleStringProperty("value");
txtArea.textProperty().bind(strPr);
Expand Down
Expand Up @@ -221,7 +221,6 @@ private void removeUncaughtExceptionHandler() {
assertTrue("PromptText cannot be bound", txtField.getPromptText().equals("newvalue"));
}

@Ignore("TODO: Please remove ignore annotation after RT-15799 is fixed.")
@Test public void checkTextPropertyBind() {
StringProperty strPr = new SimpleStringProperty("value");
txtField.textProperty().bind(strPr);
Expand Down

0 comments on commit 243b1a5

Please sign in to comment.