VitaliyKulikov / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

JTableComboBoxEditorCellWriter not accepting values not mentioned in the JComboBox model #312

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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","Configuratio
n"));
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(JTableComboBoxEd
itorCellWriter.java:49)
    at 
company.division.project.controller.env.datasheet.as.MyTestClass.myTest(MyTestCl
ass.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a: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:4
1)
    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:6
50)
    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.

Original issue reported on code.google.com by dariocon...@gmail.com on 29 Apr 2009 at 12:44

GoogleCodeExporter commented 8 years ago
We 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

Original comment by Alex.Rui...@gmail.com on 29 Apr 2009 at 6:06