Closed GoogleCodeExporter closed 9 years ago
I've made a spelling mistake in the title.
Could you correct it?
Sorry,
Csabi
Original comment by csaba.ju...@gmail.com
on 15 Jul 2008 at 2:28
Hi Csabi,
It would help us a lot if you could please attach the source for the GUI you
are
testing (if possible) :)
Thanks!
Yvonnne
Original comment by wanghy1...@gmail.com
on 15 Jul 2008 at 3:02
Hi Yvonne,
I would really like to attach the code, but I simply can't.
I'm testing a proprietary telecom application with a massive GUI.
The table I'm testing has a complex model behind it.
I don't know exactly how it works.
The editor used for the cell is:
com.l2fprod.common.beans.editor.ComboBoxPropertyEditor
and the table is contained in a:
com.jidesoft.docking.DockableFrame
Thank you,
Csabi
Original comment by csaba.ju...@gmail.com
on 16 Jul 2008 at 6:37
Hi Csabi,
No problem at all. We'll try to figure out the problem from the stack trace :)
Regards,
-Yvonne
Original comment by wanghy1...@gmail.com
on 17 Jul 2008 at 4:02
Quick question, is the JComboBox editable?
Thanks!
-Yvonne
Original comment by wanghy1...@gmail.com
on 17 Jul 2008 at 4:20
Hi,
No, it's not editable.
It would be great if you could tell me where you are writing from.
I'm writing from Romania and it seems to me that our work schedules are very
different.
I could write from home to reduce turnaround times.
If you can think of anything else that might help you, I'm listening.
Maybe it would help you to have the stack trace of the FEST thread up to the
point of
calling JComboBoxDriver#dropDownVisibleThroughUIDelegate(JComboBox, boolean),
for
example.
Thanks,
Csabi
Original comment by csaba.ju...@gmail.com
on 17 Jul 2008 at 9:13
Hi Csabi,
Thanks for your reply. I'm writing from Silicon Valley, CA.
The source of the problem is that the combobox is not being made visible, which
is
very weird. I'm working on reproducing this bug.
Thanks,
-Yvonne
Original comment by wanghy1...@gmail.com
on 17 Jul 2008 at 2:04
Hi Yvonne,
Thank you for not giving up. As I said in the initial report I've found a
workaround
for the problem, but I really hope that you'll fix the bug real soon.
My colleague who works on the table is currently on holiday, but if you can't
fix the
problem by the time he comes back, I'll ask him to write a small application
with a
similar table and I'll write a simple test for it, if the test fails, I'll send
you
the code so that you can play with it.
Thanks again,
Csabi
Original comment by csaba.ju...@gmail.com
on 17 Jul 2008 at 3:02
Hi Csabi,
I found the problem and I fixed it. Although I'm sure the bug is fixed, I still
would like to test it using the code you are going to send us.
Thanks!
-Yvonne.
Original comment by wanghy1...@gmail.com
on 18 Jul 2008 at 4:27
Original comment by wanghy1...@gmail.com
on 18 Jul 2008 at 4:28
Hi Yvonne,
I'll send you the code as soon as possible. I'll also test the fix with the
actual
code I'm testing.
Great work, thanks,
Csabi
Original comment by csaba.ju...@gmail.com
on 18 Jul 2008 at 6:28
Hi Yvonne,
I've just updated to 1.0b1. The fix doesn't seem to be working.
Here is the stack trace:
org.fest.swing.exception.WaitTimedOutError: Timed out waiting for Component
com.l2fprod.common.beans.editor.ComboBoxPropertyEditor$1[name=null,
selectedItem=All,
contents=[All, None, Per Link], editable=false, enabled=true, visible=true,
showing=false] to show on the screen
at org.fest.swing.core.Pause.pause(Pause.java:64)
at org.fest.swing.core.Pause.pause(Pause.java:42)
at
org.fest.swing.driver.JTableComboBoxEditorCellWriter.startCellEditing(JTableComb
oBoxEditorCellWriter.java:55)
at
org.fest.swing.driver.JTableComboBoxEditorCellWriter.enterValue(JTableComboBoxEd
itorCellWriter.java:47)
at org.fest.swing.driver.BasicJTableCellWriter.enterValue(BasicJTableCellWriter.java:65)
at org.fest.swing.driver.JTableDriver.enterValueInCell(JTableDriver.java:347)
at org.fest.swing.fixture.JTableCellFixture.enterValue(JTableCellFixture.java:252)
at ro.alcatel.art.test.acceptance.sncp.TestCase02.execute03(TestCase02.java:95)
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:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:712)
at org.testng.TestRunner.privateRun(TestRunner.java:582)
at org.testng.TestRunner.run(TestRunner.java:477)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:823)
at org.testng.TestNG.runSuitesLocally(TestNG.java:790)
at org.testng.TestNG.run(TestNG.java:708)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Unfortunately we are currently jumping from release 1.3 to 2.0 with our telecom
application, there is a lot of work to do, so I cannot rely on my colleague to
write
the test application, I'll try to do it myself.
I'm also having a similar problem with a JFormattedTextField in a
com.l2fprod.common.propertysheet.PropertySheetTable.
I've done some debugging and it seems that the width and height of the text
field are
both 0.
This doesn't happen when running the application normally. I've verified with
Swing
Explorer.
Here is the stack trace:
org.fest.swing.exception.WaitTimedOutError: Timed out waiting for Component
javax.swing.JFormattedTextField[name=null, text='-135.42', enabled=true,
visible=true, showing=false] to show on the screen
at org.fest.swing.core.Pause.pause(Pause.java:64)
at org.fest.swing.core.Pause.pause(Pause.java:42)
at
org.fest.swing.driver.JTableTextComponentEditorCellWriter.startCellEditing(JTabl
eTextComponentEditorCellWriter.java:57)
at
org.fest.swing.driver.JTableTextComponentEditorCellWriter.enterValue(JTableTextC
omponentEditorCellWriter.java:48)
at org.fest.swing.driver.BasicJTableCellWriter.enterValue(BasicJTableCellWriter.java:65)
at org.fest.swing.driver.JTableDriver.enterValueInCell(JTableDriver.java:347)
at org.fest.swing.fixture.JTableCellFixture.enterValue(JTableCellFixture.java:252)
at ro.alcatel.art.test.play.TestPropertiesPanel.step04(TestPropertiesPanel.java:85)
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:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:712)
at org.testng.TestRunner.privateRun(TestRunner.java:582)
at org.testng.TestRunner.run(TestRunner.java:477)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:823)
at org.testng.TestNG.runSuitesLocally(TestNG.java:790)
at org.testng.TestNG.run(TestNG.java:708)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Thanks,
Csabi
Original comment by csaba.ju...@gmail.com
on 20 Aug 2008 at 6:37
Hi again Yvonne,
I think I have finally found the problem.
It is in the enterValue(String) method of JTableTextComponentEditorCellWriter
and
JTableComboBoxEditorCellWriter. I'll demonstrate with
JTableTextComponentEditorCellWriter.
The problem is that #enterValue(String) calls #editor(JTable, int, int) twice,
once
directly and once indirectly, via startCellEditing(JTable, int, int).
This is a problem if either getCellEditor(int, int) of the table or
getTableCellEditorComponent(JTable, Object, boolean, int, int) of the cell
editor
returns a new instance each time it is called.
For me it is the first case.
In JTableTextComponentEditorCellWriter#enterValue(String) the first line
JTextComponent editor = editor(table, row, column);
just gets an editor component, without the table being edited.
The second line
startCellEditing(table, row, column);
properly starts editing.
The third line
driver.replaceText(editor, value);
uses the editor retrieved in the first line.
Now here is the problem. It should, instead use the editor created by calling
startCellEditing.
In fact this would be wrong to, because the call to editor(JTable, int, int) in
startCellEditing(JTable, int, int) also returns an editor which has nothing to
do
with the table (it's not the editor created by clicking on the cell). The real
solution is to find the real editor in the component hierarchy.
A solution might be:
public void enterValue(JTable table, int row, int column, String value) {
JTextComponent editor = startCellEditing(table, row, column);
driver.replaceText(editor, value);
stopEditing(editor);
}
/** ${@inheritDoc} */
public void startCellEditing(JTable table, int row, int column) {
clickCell(table, row, column, 2);
JTextComponent editor = robot.finder().findByType(table, JTextComponent.class);
pause(new WaitForComponentToShowCondition(editor));
}
I don't know if using the finder this way is correct, the robot should find
subtypes
of JTextComponent too.
Thank you,
Csabi
Original comment by csaba.ju...@gmail.com
on 20 Aug 2008 at 11:14
Actually, the solution I gave isn't such a good one.
Here is a better one: http://drop.io/tlmpw7n
I haven't solved cancellation, it is more tricky, because the editor (not the
editor
component) cannot be found in the component hierarchy.
I hope that you will find a solution for cancellation as well.
Thank you,
Csabi
Original comment by csaba.ju...@gmail.com
on 20 Aug 2008 at 11:52
Hi Csabi,
Thank you so much for helping us fixing this bug. We truly, truly appreciate
the
effort you have put to find the problem. It is awesome!
Many thanks!
-Yvonne
Original comment by wanghy1...@gmail.com
on 20 Aug 2008 at 1:44
Hi Yvonne,
Thank you for this great framework.
I love the changes in 1.0b1.
Have a great day,
Csabi
Original comment by csaba.ju...@gmail.com
on 20 Aug 2008 at 2:17
Set the module as a label, instead of being part of the title.
Original comment by Alex.Rui...@gmail.com
on 1 Dec 2008 at 2:08
Hi Csabi,
Thanks for the kind words about FEST! :)
We have changed the way cell editing works now. We don't call editor anymore for
every single action. The fix is in 1.0b3-SNAPSHOT-2. You can find more details
about
where to get it at
http://groups.google.com/group/easytesting/browse_frm/thread/7bd11084eac6ef44
I'm going to mark this bug as fixed.
As always, we truly appreciate your help!
Cheers,
-Alex
Original comment by Alex.Rui...@gmail.com
on 1 Dec 2008 at 7:55
Hi Alex,
Thanks for fixing it.
Regards,
Csabi
Original comment by csaba.ju...@gmail.com
on 3 Dec 2008 at 8:50
Original issue reported on code.google.com by
csaba.ju...@gmail.com
on 15 Jul 2008 at 2:26