package de.saxsys.mvvmfx.contacts;

import javafx.geometry.VerticalDirection;
import javafx.scene.Parent;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.loadui.testfx.Assertions;
import org.loadui.testfx.GuiTest;
import org.testfx.api.FxRobot;
import org.testfx.api.FxToolkit;

import static org.loadui.testfx.Assertions.verifyThat;
import static org.loadui.testfx.controls.TableViews.containsCell;

public class AppTestFxIT extends FxRobot {
	
	@Before
	public  void setupApp() throws Exception{

		FxToolkit.registerPrimaryStage();
	
		FxToolkit.setupApplication(App.class);
	}
	
	@Test
	public void testAddNewContact(){
		clickOn("#addNewContactButton");
		
		clickOn("#firstnameInput");
		write("luke");
		
		clickOn("#lastnameInput");
		write("skywalker");
		
		clickOn("#emailInput");
		write("luke.skywalker@example.org");
		
		clickOn("#nextButton");
		
		
		clickOn("#okButton");
		
		verifyThat("#masterContactTable", containsCell("luke"));
		verifyThat("#masterContactTable", containsCell("skywalker"));
		verifyThat("#masterContactTable", containsCell("luke.skywalker@example.org"));
	}
}

@@ -40,126 +40,125 @@
 ort 
-javafx.geometry.VerticalDirection;%0Aimport javafx.scene.Parent;%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass
+static org.testfx.api.FxAssert.verifyThat;%0Aimport static org.testfx.matcher.control.TableViewMatchers.hasTableCell
 ;%0A
+%0A
 impo
@@ -174,269 +174,101 @@
 nit.
-Test;%0Aimport org.loadui.testfx.Assertions;%0Aimport org.loadui.testfx.GuiTest;%0Aimport org.testfx.api.FxRobot;%0Aimport org.testfx.api.FxToolkit;%0A%0Aimport static org.loadui.testfx.Assertions.verifyThat;%0Aimport static org.loadui.testfx.controls.TableViews.containsCell
+Before;%0Aimport org.junit.Test;%0Aimport org.testfx.api.FxRobot;%0Aimport org.testfx.api.FxToolkit
 ;%0A%0Ap
@@ -328,17 +328,16 @@
 %09public 
- 
 void set
@@ -360,18 +360,21 @@
 xception
+ 
 %7B%0A
+%09%09
 %0A%09%09FxToo
@@ -403,16 +403,17 @@
 age();%0A%09
+%09
 %0A%09%09FxToo
@@ -490,17 +490,21 @@
 ontact()
-%7B
+ %7B%0A%09%09
 %0A%09%09click
@@ -797,32 +797,32 @@
 tactTable%22, 
-contains
+hasTable
 Cell(%22luke%22)
@@ -856,32 +856,32 @@
 tactTable%22, 
-contains
+hasTable
 Cell(%22skywal
@@ -928,16 +928,16 @@
 e%22, 
-contains
+hasTable
 Cell

Update TestFX test in contacts module to fix compile error