Skip to content
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

(refactor) Extract robot and service classes from GuiTest. #39

Merged
merged 67 commits into from
Feb 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8909c7b
Reformat code and optimize imports.
hastebrot Jan 11, 2014
7d8af77
Extract classes KeyboardRobot and MouseRobot.
hastebrot Jan 11, 2014
3eac111
Fix wrong method call (press => release).
hastebrot Jan 13, 2014
b04ab43
Reformat code and optimize imports.
hastebrot Jan 13, 2014
cb9f38a
Refactor methods in ScreenRobot.
hastebrot Jan 13, 2014
3405406
Create SceneProvider and StageRetriever.
hastebrot Jan 13, 2014
8e49871
Create BoundsLocator and PointLocator.
hastebrot Jan 14, 2014
d10bd04
Refactor pointFor(), pointForBounds() and sceneBoundsToScreenBounds().
hastebrot Jan 14, 2014
59aad20
Fix type mismatch with Point and Point2D.
hastebrot Jan 14, 2014
0ec6e85
Simplify pointFor(Scene, Pos).
hastebrot Jan 14, 2014
820cc0c
Move functionality from PointLocator to BoundsLocator.
hastebrot Jan 14, 2014
53ec2d0
Rearrange methods in BoundsLocator.
hastebrot Jan 14, 2014
e8db98b
Create PointBounds.
hastebrot Jan 14, 2014
be73d5a
Change public method to private.
hastebrot Jan 14, 2014
bf85537
Change return value in pointFor() from Point2D to PointBounds.
hastebrot Jan 14, 2014
124f1b1
Rename PointBounds to PointQuery.
hastebrot Jan 14, 2014
896bc3e
Fix pointFor(Iterable).
hastebrot Jan 14, 2014
2e6ca75
Refactor PointQuery to interface.
hastebrot Jan 14, 2014
8fe8e0c
Create robot.MoveRobot interface.
hastebrot Jan 14, 2014
f8c94a0
Document methods in MoveRobot interface.
hastebrot Jan 14, 2014
8dd9012
Implemented robot.MoveRobot with moveTo() and moveBy().
hastebrot Jan 14, 2014
410da44
Create robot.DragRobot interface.
hastebrot Jan 14, 2014
371708c
Implement robot.DragRobot with drag(), drop(), dropTo() and dropBy().
hastebrot Jan 14, 2014
c9c41c9
Create robot.ClickRobot interface.
hastebrot Jan 14, 2014
4aca943
Implement robot.ClickRobot with click(), rightClick() and doubleClick().
hastebrot Jan 14, 2014
dba07e1
Remove MouseMotion, move(Object) pointFor(OffsetTarget) and pointForO…
hastebrot Jan 14, 2014
f05b303
Change Predicate<Node> to Predicate<T extends Node>.
hastebrot Jan 14, 2014
ecc9c37
Refactor offset() and remove OffsetTarget.
hastebrot Jan 14, 2014
2b0c0a6
Replace SettableFuture with StageFuture.
hastebrot Jan 22, 2014
6e1087d
Simplify BoundsQuery.pointForPosition().
hastebrot Jan 22, 2014
45aa6d0
Create NodeFinder, NodeFinderException and WindowFinder.
hastebrot Jan 22, 2014
9e15c01
Create NodeFinderImpl and WindowFinderImpl.
hastebrot Jan 22, 2014
c9c7108
Change find(), findAll(), target() and targetWindow() to use NodeFind…
hastebrot Jan 22, 2014
ba47619
Change find(), findAll(), target() and targetWindow() to use NodeFind…
hastebrot Jan 22, 2014
7f5e924
Simplify target() and parent().
hastebrot Jan 23, 2014
6aa53c9
Rearrange KeyboardRobot and MouseRobot.
hastebrot Jan 23, 2014
fb6abfc
Create robot.ScrollRobot interface and implement it with scroll(), sc…
hastebrot Jan 23, 2014
a3295b0
Create robot.SleepRobot interface and implement it with sleep().
hastebrot Jan 23, 2014
9b23aee
Create robot.TypeRobot interface and implement it with type() and era…
hastebrot Jan 23, 2014
f674fb3
Create service.wait.WaitUntilSupport and implement waitUntil().
hastebrot Jan 23, 2014
398a30a
Create service.support.CaptureSupport and implement captureScreenToFi…
hastebrot Jan 23, 2014
4f54b29
Extract interface for robots.KeyboardRobot.
hastebrot Jan 23, 2014
55afbc1
Extract interface for robots.MouseRobot.
hastebrot Jan 23, 2014
4aaf7b5
Limit license header to width of 100 chars and add license header to …
hastebrot Jan 23, 2014
a3ab598
Rearrange methods between NodeFinder and WindowFinder.
hastebrot Jan 23, 2014
b0e4b95
Cleanup method calls to WindowFinder and NodeFinder.
hastebrot Jan 23, 2014
d1d12d8
Add PointLocatorTest.
hastebrot Jan 27, 2014
a3fce15
Add BoundsLocatorTest.
hastebrot Jan 29, 2014
7d67371
Extract interface from BoundsLocator and PointLocator.
hastebrot Jan 29, 2014
264bf8b
Extend PointLocatorImplTest.
hastebrot Jan 29, 2014
741d5ff
Add WindowFinderImplTest.
hastebrot Feb 3, 2014
b1e37ba
Add NodeFinderImplTest.
hastebrot Feb 4, 2014
1265f26
Minor changes in WindowFinderImplTest and BoundsLocatorImplTest.
hastebrot Feb 5, 2014
e90d0ef
Extract class FxRobot from GuiTest.
hastebrot Feb 5, 2014
b3afe60
Refactor FxTestUtils and create FxApplicationUtils and FxLauncherUtils.
hastebrot Feb 5, 2014
63a9488
Refactor FxTestUtils.
hastebrot Feb 5, 2014
22447d8
Revert rename FXTestUtils.
hastebrot Feb 5, 2014
8790885
Revert rename FXTestUtils.
hastebrot Feb 5, 2014
d1d476c
Create AppLauncher, AppSetup, StageSetup and StageSetupCallback.
hastebrot Feb 6, 2014
ef214e5
Extend StageSetupImpl and simplify tests.
hastebrot Feb 6, 2014
e82254c
Expose more methods in interface AppSetup and StageSetup.
hastebrot Feb 9, 2014
3483000
Merged root tests and updates controls package.
hastebrot Feb 10, 2014
85e51ff
Document AppSetupImpl.
hastebrot Feb 11, 2014
afa35d1
Rename FxAppLauncher to DefaultAppLauncher.
hastebrot Feb 11, 2014
dc7c4a8
Add StageSetupImplTest.
hastebrot Feb 11, 2014
9f0c020
Rename AppRobotTest to AppRobotTestBase.
hastebrot Feb 11, 2014
fd83018
Merge branch 'master' into feature/refactor-guitest
hastebrot Feb 11, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -83,4 +83,4 @@ TestFX was initially created by @dainnilsson and @minisu as a part of [LoadUI][2
[18]: https://github.com/SmartBear/TestFX/wiki/Login-form#using-textlabels
[8]: https://oracleus.activeevents.com/2013/connect/sessionDetail.ww?SESSION_ID=2670 "Ten Man-Years of JavaFX: Real-World Project Experiences [CON2670]"
[9]: https://github.com/SmartBear/loadui/tree/master/loadui-project/loadui-fx-interface/src/test/java/com/eviware/loadui/ui/fx "GUI tests in LoadUI"
[10]: http://youtu.be/fgD8fBn1cYw "Video of the LoadUI TestFX test suite"
[10]: http://youtu.be/fgD8fBn1cYw "Video of the LoadUI TestFX test suite"
30 changes: 15 additions & 15 deletions pom.xml
Expand Up @@ -7,7 +7,7 @@
<version>3.1.2</version>
<name>TestFX</name>
<description>TestFX</description>
<url>https://github.com/SmartBear/TestFX</url>
<url>https://github.com/SmartBear/TestFX</url>

<licenses>
<license>
Expand All @@ -20,10 +20,10 @@
<scm>
<url>https://github.com/SmartBear/TestFX.git</url>
</scm>
<profiles>
<profile>
<id>release</id>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -72,10 +72,10 @@

</plugins>
</build>
</profile>
</profiles>
<developers>
</profile>
</profiles>

<developers>
<developer>
<id>minisu</id>
<name>Henrik Olsson</name>
Expand All @@ -93,9 +93,9 @@
</roles>
</developer>
</developers>

<contributors>
<contributor>
<contributor>
<name>Philipp Keck</name>
<url>https://github.com/Philipp91</url>
</contributor>
Expand All @@ -104,10 +104,10 @@
<url>https://github.com/SmartBear/loadui</url>
</contributor>
</contributors>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/org/loadui/testfx/Assertions.java
Expand Up @@ -6,7 +6,6 @@

import static org.hamcrest.MatcherAssert.assertThat;
import static org.loadui.testfx.GuiTest.find;
import static org.loadui.testfx.utils.FXTestUtils.releaseButtons;

public class Assertions
{
Expand Down Expand Up @@ -34,7 +33,6 @@ public static <T> void verifyThat( String reason, T value, Matcher<? super T> ma
}
catch( AssertionError e )
{
releaseButtons();
throw new AssertionError( e.getMessage() + " Screenshot saved as " + GuiTest.captureScreenshot().getAbsolutePath() , e );
}
}
Expand All @@ -43,18 +41,12 @@ public static <T extends Node> void verifyThat( String query, Predicate<T> predi
{
T node = find( query );
if(! predicate.apply( node ) )
{
releaseButtons();
throw new AssertionError( "Predicate failed for query '" + query + "'. Screenshot saved as " + GuiTest.captureScreenshot().getAbsolutePath() );
}
}

public static <T extends Node> void verifyThat( T node, Predicate<T> predicate )
{
if(! predicate.apply( node ) )
{
releaseButtons();
throw new AssertionError( "Predicate failed for '" + node + "'. Screenshot saved as " + GuiTest.captureScreenshot().getAbsolutePath() );
}
}
}
154 changes: 0 additions & 154 deletions src/main/java/org/loadui/testfx/FXScreenController.java

This file was deleted.