Commit bda88854 authored by Jérome Perrin's avatar Jérome Perrin

fix actual / excpected confusion

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8587 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 941b16bb
......@@ -14,7 +14,7 @@
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts53257338.14</string> </value>
<value> <string>ts53312644.38</string> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
......@@ -54,11 +54,13 @@
* Values are converted to float, to be format-independant (ie. 1 000 = 1000.0)\n
*/\n
Selenium.prototype.assertFloat = function(locator, text) {\n
var expectedValue = parseFloat(getText(this.page().findElement(locator)));\n
var actualValue = parseFloat(text);\n
var actualValueText = getText(this.page().findElement(locator));\n
var actualValue = parseFloat(actualValueText);\n
var expectedValue = parseFloat(text);\n
\n
if (isNaN(expectedValue)) {\n
Assert.fail("Expected value "+ locator + " cannot be parsed as float");\n
if (isNaN(actualValue)) {\n
Assert.fail("Actual value "+ actualValueText +\n
" cannot be parsed as float");\n
}\n
Assert.matches(expectedValue.toString(), actualValue.toString());\n
};\n
......@@ -70,7 +72,7 @@ Selenium.prototype.assertFloat = function(locator, text) {\n
</item>
<item>
<key> <string>size</string> </key>
<value> <int>593</int> </value>
<value> <long>664</long> </value>
</item>
<item>
<key> <string>title</string> </key>
......
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