From b306c8f74680c5a0f048f28ce69563ebd718b9bb Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Tue, 18 Oct 2016 15:35:11 +0000
Subject: [PATCH] [erp5_web_renderjs_ui_test] DateTimeField has been
 reimplemeted

---
 .../testBasicDateTimeType.zpt                 |  2 +-
 .../testDateTimeDefaultToNow.zpt              |  4 ++--
 .../testInvalidDateTime.zpt                   | 13 ++++++++----
 .../datetimefield_zuite/testLeapYear.zpt      | 14 ++++++-------
 .../testSetDateTimeZone.zpt                   | 18 ++++++++---------
 .../testSetDateTimeZone2DigitsYear.zpt        | 20 +++++++++----------
 .../testSetTimeZoneWithoutDateTime.zpt        | 10 +++++-----
 7 files changed, 43 insertions(+), 38 deletions(-)

diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testBasicDateTimeType.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testBasicDateTimeType.zpt
index ef2c142b4d..b897e82b29 100644
--- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testBasicDateTimeType.zpt
+++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testBasicDateTimeType.zpt
@@ -87,7 +87,7 @@
 
 <tr>
   <td>verifyElementPresent</td>
-  <td>//input[@name="field_last_check"]</td>
+  <td>//div[@data-gadget-scope="field_last_check"]//p</td>
   <td></td>
 </tr>
 
diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testDateTimeDefaultToNow.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testDateTimeDefaultToNow.zpt
index 4b928e164f..0875b682df 100644
--- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testDateTimeDefaultToNow.zpt
+++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testDateTimeDefaultToNow.zpt
@@ -177,14 +177,14 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']</td>
   <td></td>
 </tr>
 
 
 <tr>
   <td>verifyValue</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']//input</td>
   <td>glob:${now}*</td>
 </tr>
 
diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testInvalidDateTime.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testInvalidDateTime.zpt
index b37d58f1ef..982a6491b7 100644
--- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testInvalidDateTime.zpt
+++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testInvalidDateTime.zpt
@@ -78,13 +78,13 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']</td>
   <td></td>
 </tr>
 
 <tr>
   <td>type</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
   <td>9915-14-21T11:00</td>
 </tr>
 
@@ -100,6 +100,11 @@
   <td></td>
 </tr>
 
+<tr>
+  <td>pause</td>
+  <td>1000</td>
+  <td></td>
+</tr>
 
 <tr>
   <td>click</td>
@@ -121,14 +126,14 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']</td>
   <td></td>
 </tr>
 
 
 <tr>
   <td>verifyValue</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
   <td></td>
 </tr>
 </tbody></table>
diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testLeapYear.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testLeapYear.zpt
index 4366a37610..fd1d67b64e 100644
--- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testLeapYear.zpt
+++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testLeapYear.zpt
@@ -79,20 +79,20 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']</td>
   <td></td>
 </tr>
 
 
 <tr>
   <td>type</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
   <td>2004-02-29T23:10</td>
 </tr>
 
 <tr>
   <td>select</td>
-  <td>//select[@class='gmt_select']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
   <td>GMT-10</td>
 </tr>
 
@@ -118,21 +118,21 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']</td>
   <td></td>
 </tr>
 
 
 <tr>
   <td>verifyValue</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
   <td>2004-02-29T23:10:00</td>
 </tr>
 
 <tr>
   <td>verifyValue</td>
-  <td>//select[@class='gmt_select']</td>
-  <td>GMT-10</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
+  <td>-1000</td>
 </tr>
 </tbody></table>
 </body>
diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetDateTimeZone.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetDateTimeZone.zpt
index 4b21a7421b..9e41572067 100644
--- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetDateTimeZone.zpt
+++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetDateTimeZone.zpt
@@ -79,25 +79,25 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']</td>
   <td></td>
 </tr>
 
 <tr>
   <td>type</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']//input</td>
   <td>2015-12-21T11:00</td>
 </tr>
 
 <tr>
   <td>type</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
   <td>2016-12-21T12:00</td>
 </tr>
 
 <tr>
   <td>select</td>
-  <td>//select[@class='gmt_select']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
   <td>GMT+5</td>
 </tr>
 
@@ -124,27 +124,27 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']</td>
   <td></td>
 </tr>
 
 
 <tr>
   <td>verifyValue</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']//input</td>
   <td>2015-12-21T11:00:00</td>
 </tr>
 
 <tr>
   <td>verifyValue</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
   <td>2016-12-21T12:00:00</td>
 </tr>
 
 <tr>
   <td>verifyValue</td>
-  <td>//select[@class='gmt_select']</td>
-  <td>GMT+5</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
+  <td>+0500</td>
 </tr>
 </tbody></table>
 </body>
diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetDateTimeZone2DigitsYear.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetDateTimeZone2DigitsYear.zpt
index 8b462c4956..b11ff0befd 100644
--- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetDateTimeZone2DigitsYear.zpt
+++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetDateTimeZone2DigitsYear.zpt
@@ -78,32 +78,32 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']</td>
   <td></td>
 </tr>
 
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']</td>
   <td></td>
 </tr>
 
 <tr>
   <td>type</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
   <td>0016-12-21T12:00</td>
 </tr>
 
 <tr>
   <td>type</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']//input</td>
   <td>0022-12-21T09:00</td>
 </tr>
 
 <tr>
   <td>select</td>
-  <td>//select[@class='gmt_select']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
   <td>GMT+5</td>
 </tr>
 
@@ -135,26 +135,26 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']</td>
   <td></td>
 </tr>
 
 
 <tr>
   <td>verifyValue</td>
-  <td>//input[@name='field_my_stop_date']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//input</td>
   <td>2016-12-21T12:00:00</td>
 </tr>
 
 <tr>
   <td>verifyValue</td>
-  <td>//select[@class='gmt_select']</td>
-  <td>GMT+5</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
+  <td>+0500</td>
 </tr>
 
 <tr>
   <td>verifyValue</td>
-  <td>//input[@name='field_my_start_date']</td>
+  <td>//div[@data-gadget-scope='field_my_start_date']//input</td>
   <td>2022-12-21T09:00:00</td>
 </tr>
 
diff --git a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetTimeZoneWithoutDateTime.zpt b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetTimeZoneWithoutDateTime.zpt
index fe16c5e39e..1e16a88849 100644
--- a/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetTimeZoneWithoutDateTime.zpt
+++ b/bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/datetimefield_zuite/testSetTimeZoneWithoutDateTime.zpt
@@ -79,13 +79,13 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//select[@class='gmt_select']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']</td>
   <td></td>
 </tr>
 
 <tr>
   <td>select</td>
-  <td>//select[@class='gmt_select']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
   <td>GMT+5</td>
 </tr>
 
@@ -111,14 +111,14 @@
 
 <tr>
   <td>waitForElementPresent</td>
-  <td>//select[@class='gmt_select']</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
   <td></td>
 </tr>
 
 <tr>
   <td>verifyValue</td>
-  <td>//select[@class='gmt_select']</td>
-  <td>GMT</td>
+  <td>//div[@data-gadget-scope='field_my_stop_date']//select</td>
+  <td>+0000</td>
 </tr>
 </tbody></table>
 </body>
-- 
2.30.9