Skip to content

Commit

Permalink
Merge pull request #39 from hastebrot/feature/refactor-guitest
Browse files Browse the repository at this point in the history
WIP: Refactor GuiTest
  • Loading branch information
hastebrot committed Feb 11, 2014
2 parents 72377b5 + fd83018 commit 0e09c6f
Show file tree
Hide file tree
Showing 63 changed files with 5,180 additions and 2,086 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.

0 comments on commit 0e09c6f

Please sign in to comment.