
fest - issue #312
JTableComboBoxEditorCellWriter not accepting values not mentioned in the JComboBox model
What steps will reproduce the problem? 1. Create a Table having a DefaultCellEditor made out of a JComboBox. 2. Set this combobox enable and editable 3. 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 combobox.
What is the expected output? What do you see instead? Normally it should be accepted, as you could enter a new value in the combobox. 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
Please provide any additional information below.
Comment #1
Posted on Apr 29, 2009 by Quick WombatWe moved our issue tracker to CodeHaus' JIRA. I have created a new issue there at http://jira.codehaus.org/browse/FEST-122 . Please feel free to add yourself as observer.
I apologize for the confusion. It seems there are still some links pointing to the old issue tracker.
Cheers, -Alex
Status: New