Commit 4b8d19c9 authored by Jérome Perrin's avatar Jérome Perrin

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
parent d6024bb1
......@@ -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>
......
95
\ No newline at end of file
96
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment