Commit 767ef339 authored by Jérome Perrin's avatar Jérome Perrin

dms_ui_test: fix testContributeTab

 * Depending on conversion server speed, document will be Converted or
Converting. Assert that the state match Convert(ing|ed) to accept both.
 * prefer assert* instead of verify* to terminate test execution on
first failed assertion.
 * use more specific xpath instead of asserting that text is present in
the page.
 * checking that URL matches the previous URL interpreted as a regexp
was not working for IPv6 URL with brackets (because of the meaning of
regular expression). Because what we want here is to check that URL
starts with previously stored URL, check with a glob: expression, that
should be also compatible with IPv6 URLs.
parent 3ae3ccdb
......@@ -66,19 +66,19 @@ Wait for activities</span>
<td>001</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Original Filename"]/../div[@class="input"]</td>
<td>tiolive-ERP5.Freedom.TioLive-001-en.odp</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Type"]/../div[@class="input"]</td>
<td>Presentation</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Converted</td>
<td></td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "File State"]/../div[@class="input"]</td>
<td>regexp:Convert(ing|ed)</td>
</tr>
<tr>
<td>storeEval</td>
......@@ -114,7 +114,7 @@ Wait for activities</span>
</tr>
<tr>
<td>assertAbsoluteLocation</td>
<td>regexp:${document_location}</td>
<td>glob:${document_location}*</td>
<td></td>
</tr>
<tr>
......@@ -143,19 +143,19 @@ Wait for activities</span>
<td>001</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Original Filename"]/../div[@class="input"]</td>
<td>tiolive-ERP5.Freedom.TioLive-001-en.odp</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Type"]/../div[@class="input"]</td>
<td>Presentation</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Converted</td>
<td></td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "File State"]/../div[@class="input"]</td>
<td>regexp:Convert(ing|ed)</td>
</tr>
<!-- Contribute PDF -->
......@@ -200,9 +200,9 @@ Wait for activities</span>
<td>001</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Type"]/../div[@class="input"]</td>
<td>PDF</td>
<td></td>
</tr>
<!-- Contribute Image -->
......@@ -294,19 +294,19 @@ Wait for activities</span>
<td>001</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Original Filename"]/../div[@class="input"]</td>
<td>tiolive-ERP5.Freedom.TioLive.Spreadsheet-001-en.ods</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Type"]/../div[@class="input"]</td>
<td>Spreadsheet</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Converted</td>
<td></td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "File State"]/../div[@class="input"]</td>
<td>regexp:Convert(ing|ed)</td>
</tr>
<!-- Contribute Drawing -->
......@@ -351,19 +351,19 @@ Wait for activities</span>
<td>001</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Original Filename"]/../div[@class="input"]</td>
<td>tiolive-ERP5.Freedom.TioLive.Drawing-001-en.odg</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "Type"]/../div[@class="input"]</td>
<td>Drawing</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Converted</td>
<td></td>
<td>assertText</td>
<td>//label[normalize-space(text()) = "File State"]/../div[@class="input"]</td>
<td>regexp:Convert(ing|ed)</td>
</tr>
<span metal:use-macro="container/Zuite_CommonTemplate/macros/wait_for_activities">
......
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