Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: FEST-Swing 1.1
-
Fix Version/s: FEST-Swing 1.2a3
-
Component/s: Swing
-
Labels:None
-
Number of attachments :
Description
From darioconsoli:
What steps will reproduce the problem?
- Create a table having a DefaultCellEditor made out of a JComboBox.
- Set this combo box enable and editable
- In your test, use:
JTableFixture activationFixture = asEditScreen.table(JTableFromColumnsNameMatcher.withColumns("Days","Configuration")); JTableComboBoxEditorCellWriter textWriter = new JTableComboBoxEditorCellWriter(robot); textWriter.enterValue(activationFixture.target, 3, 3, "PIPPO");
Where "PIPPO" is not among the list of possible values of the combo box.
What is the expected output? What do you see instead?
Normally it should be accepted, as you could enter a new value in the combo box. Instead, while running the test, I get
org.fest.swing.exception.LocationUnavailableException: Unable to find item 'PIPPO' among the JComboBox contents (['CFE1W1', 'CFE2W3', 'CFE2W2', 'CFE4W3', 'CF3EW3', 'CF3HW3', 'CFE1W2', 'CFE2W1']) at org.fest.swing.driver.JComboBoxDriver.selectItem(JComboBoxDriver.java:108) at org.fest.swing.driver.JTableComboBoxEditorCellWriter.enterValue(JTableComboBoxEditorCellWriter.java:49) at company.division.project.controller.env.datasheet.as.MyTestClass.myTest(MyTestClass.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.FailOnTimeout$1.call(FailOnTimeout.java:32) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595)
What version of the product are you using? On what operating system?
FEST Swing 1.0 under WIN XP
Original report at Google Code.
Updated bug summary to reflect that is a new feature (or improvement,) instead of a bug.