From 4b8d19c96ae0f973e58b6ed4179f0d4b05472a0f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 5 Oct 2006 11:54:00 +0000
Subject: [PATCH] fix assertFloat, javascript's parseFloat("1 000") is 1

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10568 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_ui_test/user-extensions.js.xml        | 18 +++++++++++-------
 bt5/erp5_ui_test/bt/revision                   |  2 +-
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/user-extensions.js.xml b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/user-extensions.js.xml
index 0ca5e0b504..9f93dc3abb 100644
--- a/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/user-extensions.js.xml
+++ b/bt5/erp5_ui_test/SkinTemplateItem/portal_skins/erp5_ui_test/user-extensions.js.xml
@@ -14,7 +14,7 @@
       <dictionary>
         <item>
             <key> <string>_EtagSupport__etag</string> </key>
-            <value> <string>ts54185041.28</string> </value>
+            <value> <string>ts60048879.26</string> </value>
         </item>
         <item>
             <key> <string>__ac_local_roles__</string> </key>
@@ -44,7 +44,9 @@
         </item>
         <item>
             <key> <string>data</string> </key>
-            <value> <string>/**\n
+            <value> <string encoding="cdata"><![CDATA[
+
+/**\n
  * Selenium extensions for the ERP5 project\n
  */\n
 \n
@@ -55,9 +57,9 @@
  */\n
 Selenium.prototype.assertFloat = function(locator, text) {\n
     var actualValueText = getText(this.page().findElement(locator));\n
-    var actualValue = parseFloat(actualValueText);\n
-    var expectedValue = parseFloat(text);\n
-    \n
+    var actualValue = parseFloat(actualValueText.replace(/ /, "").replace(/&nbsp;/, ""));\n
+    var expectedValue = parseFloat(text.replace(/ /, "").replace(/&nbsp;/, ""));\n
+\n
     if (isNaN(actualValue)) {\n
         Assert.fail("Actual value "+ actualValueText +\n
                         " cannot be parsed as float");\n
@@ -75,7 +77,9 @@ Selenium.prototype.assertPortalStatusMessage = function(text) {\n
     Assert.matches(text, actualValue);\n
 };\n
 \n
-</string> </value>
+
+
+]]></string> </value>
         </item>
         <item>
             <key> <string>precondition</string> </key>
@@ -83,7 +87,7 @@ Selenium.prototype.assertPortalStatusMessage = function(text) {\n
         </item>
         <item>
             <key> <string>size</string> </key>
-            <value> <long>944</long> </value>
+            <value> <int>1018</int> </value>
         </item>
         <item>
             <key> <string>title</string> </key>
diff --git a/bt5/erp5_ui_test/bt/revision b/bt5/erp5_ui_test/bt/revision
index 90be1cdd8e..56749c830e 100644
--- a/bt5/erp5_ui_test/bt/revision
+++ b/bt5/erp5_ui_test/bt/revision
@@ -1 +1 @@
-95
\ No newline at end of file
+96
\ No newline at end of file
-- 
2.30.9