New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test do not start through #20
Comments
/**
package jfxtras.labs.scene.control.test; import java.util.concurrent.TimeUnit; import org.jemmy.control.Wrap; import com.google.common.util.concurrent.SettableFuture; @category( TestFX.class )
// controller.move( stage.getX() + stage.getScene().getX() + sceneBounds.getMinX() + 10, stage.getY() + stage.getScene().getY() + sceneBounds.getMinY() + 10 ); |
Hi! I've started looking at this, but I miss the file ListSpinnerTest1App.class in order to build your code. |
JFXtras is open source, you can find the file here. Also, the *Test1 is using the JemmyFX UI testing framework. But I'm not really happy with that. Tom |
This is how I would write a test for this class in TestFX: ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c")
.withEditable(true).withStringConverter(StringConverterFactory.forString())
.withCyclic(true);
showNodeInStage( lSpinner );
click(".right-arrow");
assertNodeExists("b"); This compiles and runs fine in TestFX 2.7.4. (If you still want to use the idiom launchApp idiom, you need to make ListSpinnerTest1App an inner class of the test and have its start method set stageFuture.) |
I was able to build TestFX, include it in the JFXtras project and I've copied the essence of the example test over and created one of my own. The test starts but halts at the
stage = stageFuture.get( 25, TimeUnit.SECONDS );
line, where it will throw a TimeoutException
java.util.concurrent.TimeoutException: Timeout waiting for task.
at com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:269)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:96)
at jfxtras.labs.scene.control.test.ListSpinnerTest2.createWindow(ListSpinnerTest2.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
The text was updated successfully, but these errors were encountered: