phamow / fest

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

JComboBoxFixture's enterText method ignores first character of string parameter #279

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is a sample line of code that produces this problem:

wrapperEditor.comboBox("delimitersList").doubleClick().enterText("hey").pressAnd
ReleaseKeys(VK_ENTER);

Where wrapperEditor is a Frame Fixture.

What is the expected output? What do you see instead?
The string "hey" should be typed into the editable combo box, but instead
the string "ey" is entered. If you are trying enter a string only one
character in length, fest will hang.

What version of the product are you using? On what operating system?
Using version RC2 on Windows XP.

Please provide any additional information below.

Original issue reported on code.google.com by ben.scho...@gmail.com on 9 Jan 2009 at 7:59

GoogleCodeExporter commented 9 years ago
Thanks Ben! I'll fix this bug in 1.0.

Regards,
-Alex

Original comment by Alex.Rui...@gmail.com on 9 Jan 2009 at 8:02

GoogleCodeExporter commented 9 years ago
I could not reproduce this bug. Please see the test case at
http://code.google.com/p/fest/source/browse/trunk/fest/fest-swing/src/test/java/
org/fest/swing/fixture/Bug279_FirstCharInJComboBoxMissing.java?spec=svn2200&r=22
00

I'm using Metal L&F on WinXP. Which L&F are you using?

I'm closing the bug, but feel free to open it at any time.

Thanks,
-Alex

Original comment by Alex.Rui...@gmail.com on 11 Jan 2009 at 4:53

GoogleCodeExporter commented 9 years ago
Thanks for trying this out. So I wrote a simpler test case, and I couldn't 
reproduce
either. I guess I'm getting into some weird state to make this happen. I know
something is up, because the test having problems was written and worked with 
fest
0.8.1 (I think). Once I upgraded to 1.0 RC2, this test started failing. Here is 
the
stack trace of the failure if you are interested:

Testcase: 
Focus change to javax.swing.JComboBox[name='delimitersList',
selectedItem='99Automatic', contents=['99Automatic', '93Whitespace', '59Equals',
'78Commas', '4None', '29<default>'], editable=true, enabled=true, visible=true,
showing=true] failed
org.fest.swing.exception.ActionFailedException: Focus change to
javax.swing.JComboBox[name='delimitersList', selectedItem='99Automatic',
contents=['99Automatic', '93Whitespace', '59Equals', '78Commas', '4None',
'29<default>'], editable=true, enabled=true, visible=true, showing=true] failed
        at
org.fest.swing.exception.ActionFailedException.actionFailure(ActionFailedExcepti
on.java:33)
        at org.fest.swing.core.BasicRobot.focus(BasicRobot.java:239)
        at org.fest.swing.core.BasicRobot.focusAndWaitForFocusGain(BasicRobot.java:216)
        at
org.fest.swing.driver.ComponentDriver.focusAndWaitForFocusGain(ComponentDriver.j
ava:342)
        at
org.fest.swing.driver.ComponentDriver.pressAndReleaseKeys(ComponentDriver.java:2
62)
        at
org.fest.swing.fixture.JComboBoxFixture.pressAndReleaseKeys(JComboBoxFixture.jav
a:239)
        at
com.phoenix_int.wrappereditor.PHXFileViewTest.testTypeIntoDelimitersCombobox(PHX
FileViewTest.java:196)

PHXFileViewTest.java:196 -
wrapperEditor.comboBox("delimitersList").doubleClick().enterText("
").pressAndReleaseKeys(VK_ENTER);

The work around is simple enough, so if we can't figure this out, it's OK. 
Thank you
for helping me out though.

Ben

Original comment by ben.scho...@gmail.com on 12 Jan 2009 at 3:16

GoogleCodeExporter commented 9 years ago
I am experiencing this problem too but only when the first character entered is
numeric (some symbols also). I am using fest-swing-1.0.

Original comment by stephen....@gmail.com on 3 Mar 2009 at 10:58

GoogleCodeExporter commented 9 years ago
Stephen,

Please do me a big, big favor, can you please file a bug at
http://jira.codehaus.org/browse/FEST , and include as much detail as possible. 
An
attached test case would be great! ;)

Thanks,
-Alex

Original comment by Alex.Rui...@gmail.com on 3 Mar 2009 at 11:48