From 73bf8ed665e2e7a10540a9f753f87f60ec6d9edb Mon Sep 17 00:00:00 2001
From: Eduard Moraru <Enygma2002@gmail.com>
Date: Thu, 11 Sep 2014 16:22:23 +0300
Subject: [PATCH] [build] Fixed tests. - Negative yoffsets work only when
 moving before a field that is not the top field. Using 0 yoffset works both
 for moving before top fields and also before lower ones. - xoffset seems to
 work fine with a value of 0, so I also removed the comment saying it doesn't.

---
 .../appwithinminutes/test/po/ApplicationClassEditPage.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test-pageobjects/src/main/java/org/xwiki/appwithinminutes/test/po/ApplicationClassEditPage.java b/xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test-pageobjects/src/main/java/org/xwiki/appwithinminutes/test/po/ApplicationClassEditPage.java
index 53707b53e74..b9b1744f74d 100644
--- a/xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test-pageobjects/src/main/java/org/xwiki/appwithinminutes/test/po/ApplicationClassEditPage.java
+++ b/xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test-pageobjects/src/main/java/org/xwiki/appwithinminutes/test/po/ApplicationClassEditPage.java
@@ -172,8 +172,7 @@ public Boolean apply(WebDriver driver)
      */
     public void moveFieldBefore(String fieldToMove, String beforeField)
     {
-        // Drag the field slightly before the target field (vertically). For some reason it doesn't work if we use x=0.
-        new ClassFieldEditPane(fieldToMove).dragTo(fieldsCanvas.findElement(By.id("field-" + beforeField)), 1, -30);
+        new ClassFieldEditPane(fieldToMove).dragTo(fieldsCanvas.findElement(By.id("field-" + beforeField)), 0, 0);
     }
 
     /**
-- 
GitLab