My favorites | Sign in
Project Home Downloads Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 14: Test 'shouldApproveFileSelection' in JFileChooserFixtureTest fails on Mac OS X
4 people starred this issue and may be notified of changes. Back to list
 
Project Member Reported by wanghy1...@gmail.com, Jul 15, 2007
Fixture is not able to find the 'Approve' JButton.
Feb 10, 2008
#2 nic.mcp...@gmail.com
Has there been any follow-up on this?  We're trying to use FEST on Mac OS X, and just
spent way too long trying to figure out why our tests that refer to JFileChoosers
were breaking.  When we try to "click" approve() on our JFileChooser, the test dies
because there appears to be two "Open" buttons.

Does this work on Linux and Windows and its just a Mac OS X thing?  (That would be
very useful information.)

Thanks - Nic McPhee

===========

org.fest.swing.exception.ComponentLookupException: Found more than one component
using matcher org.fest.swing.fixture.JButtonMatcher[textToMatch='Open'].

Found:
javax.swing.JButton[name=null, text='Open', enabled=false, visible=true, showing=true]
javax.swing.JButton[name=null, text='Open', enabled=true, visible=false, showing=false]

	at
org.fest.swing.core.BasicComponentFinder.multipleComponentsFound(BasicComponentFinder.java:103)
	at org.fest.swing.core.BasicComponentFinder.find(BasicComponentFinder.java:66)
	at org.fest.swing.core.BasicComponentFinder.find(BasicComponentFinder.java:54)
	at org.fest.swing.core.ComponentFinder.find(ComponentFinder.java:344)
	at org.fest.swing.core.ComponentFinder.find(ComponentFinder.java:331)
	at org.fest.swing.fixture.JFileChooserFixture.findButton(JFileChooserFixture.java:171)
	at
org.fest.swing.fixture.JFileChooserFixture.approveButton(JFileChooserFixture.java:159)
	at org.fest.swing.fixture.JFileChooserFixture.approve(JFileChooserFixture.java:149)
	at
umm.softwaredesign.photoliblab.GUI.NewLibraryTest.chooseTestLibraryDirectory(NewLibraryTest.java:73)
	at
umm.softwaredesign.photoliblab.GUI.NewLibraryTest.testNewLibrary(NewLibraryTest.java:65)
	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.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
	at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
	at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
	at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
	at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
	at
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
	at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
	at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
	at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
	at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)




Jul 20, 2008
Project Member #3 wanghy1...@gmail.com
Hi Nic,

Sorry for the late reply. This is a OSX-specific bug. We are working on it at this
moment.

Regards,
Yvonne
Jul 20, 2008
Project Member #4 wanghy1...@gmail.com
Fixed. JFileChooserDriver checks that lookup of buttons search for visible (or
'showing') buttons.
Status: Fixed
Nov 30, 2008
Project Member #5 Alex.Rui...@gmail.com
Set the module as a label, instead of being part of the title.
Labels: Module-fest-swing
Nov 30, 2008
Project Member #6 Alex.Rui...@gmail.com
Set the module as a label, instead of being part of the title.
Summary: Test 'shouldApproveFileSelection' in JFileChooserFixtureTest fails on Mac OS X
Sign in to add a comment

Powered by Google Project Hosting