Commit 12552890 authored by Boxiang Sun's avatar Boxiang Sun Committed by Romain Courteaud

erp5_officejs_support_request_ui_test: let the tests fail faster

Add some assertElementPresent right after the waitForElementPresent to stop the stop in case of missing element.
parent 7ed4d8dd
...@@ -59,6 +59,11 @@ ...@@ -59,6 +59,11 @@
<td>//input[@data-i18n="[value]Post Comment"]</td> <td>//input[@data-i18n="[value]Post Comment"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n="[value]Post Comment"]</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Comments:</td> <td>Comments:</td>
...@@ -104,6 +109,11 @@ ...@@ -104,6 +109,11 @@
<td>//p[contains(text(), "RobotMaking")]</td> <td>//p[contains(text(), "RobotMaking")]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//p[contains(text(), "RobotMaking")]</td>
<td></td>
</tr>
<tr> <tr>
<td>assertTextNotPresent</td> <td>assertTextNotPresent</td>
<td>Requester</td> <td>Requester</td>
......
...@@ -57,6 +57,11 @@ ...@@ -57,6 +57,11 @@
<td>//select[@id="field_your_resource"]/option[text()="FeatureRequire"]</td> <td>//select[@id="field_your_resource"]/option[text()="FeatureRequire"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@id="field_your_resource"]/option[text()="FeatureRequire"]</td>
<td></td>
</tr>
<tr> <tr>
<td>select</td> <td>select</td>
<td>field_your_resource</td> <td>field_your_resource</td>
...@@ -73,6 +78,11 @@ ...@@ -73,6 +78,11 @@
<td>//input[@data-i18n="[value]Post Comment"]</td> <td>//input[@data-i18n="[value]Post Comment"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n="[value]Post Comment"]</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Comments:</td> <td>Comments:</td>
...@@ -154,6 +164,11 @@ ...@@ -154,6 +164,11 @@
<td>//div[@data-gadget-scope='notification' and @class='visible']//button[@class='success' and text()='Comment added']</td> <td>//div[@data-gadget-scope='notification' and @class='visible']//button[@class='success' and text()='Comment added']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='notification' and @class='visible']//button[@class='success' and text()='Comment added']</td>
<td></td>
</tr>
<tr> <tr>
<td>openAndWait</td> <td>openAndWait</td>
<td tal:content="string: ${here/portal_url}/Zuite_waitForActivities"></td> <td tal:content="string: ${here/portal_url}/Zuite_waitForActivities"></td>
...@@ -174,11 +189,21 @@ ...@@ -174,11 +189,21 @@
<td tal:content="string:Post test ${filename}"></td> <td tal:content="string:Post test ${filename}"></td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertTextPresent</td>
<td tal:content="string:Post test ${filename}"></td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>attachment</td> <td>attachment</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>attachment</td>
<td></td>
</tr>
</tal:block> </tal:block>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
...@@ -244,6 +269,11 @@ ...@@ -244,6 +269,11 @@
<td>//p[contains(text(), '${current_reference}')]</td> <td>//p[contains(text(), '${current_reference}')]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//p[contains(text(), '${current_reference}')]</td>
<td></td>
</tr>
</tal:block> </tal:block>
<!-- Attached documents can also be found from "Documents" action --> <!-- Attached documents can also be found from "Documents" action -->
......
...@@ -42,12 +42,21 @@ ...@@ -42,12 +42,21 @@
<td>//select[@name="field_your_project"]/option[text() = "RobotMaking"]</td> <td>//select[@name="field_your_project"]/option[text() = "RobotMaking"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="field_your_project"]/option[text() = "RobotMaking"]</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//select[@name="field_your_project"]/option[text() = "Second Project"]</td> <td>//select[@name="field_your_project"]/option[text() = "Second Project"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="field_your_project"]/option[text() = "Second Project"]</td>
<td></td>
</tr>
<tr> <tr>
<td>select</td> <td>select</td>
...@@ -60,6 +69,11 @@ ...@@ -60,6 +69,11 @@
<td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td> <td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementNotPresent</td> <td>waitForElementNotPresent</td>
<td>//select[@name="field_your_resource"]/option[text() = "BugReport"]</td> <td>//select[@name="field_your_resource"]/option[text() = "BugReport"]</td>
...@@ -77,11 +91,21 @@ ...@@ -77,11 +91,21 @@
<td>//select[@name="field_your_resource"]/option[text() = "BugReport"]</td> <td>//select[@name="field_your_resource"]/option[text() = "BugReport"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="field_your_resource"]/option[text() = "BugReport"]</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td> <td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td>
<td></td>
</tr>
<tr> <tr>
<td>select</td> <td>select</td>
......
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
<td>//select[@name="field_your_resource"]/option[text() = "FeatureRequire"]</td> <td>//select[@name="field_your_resource"]/option[text() = "FeatureRequire"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="field_your_resource"]/option[text() = "FeatureRequire"]</td>
<td></td>
</tr>
<!-- this default project have a a sale supply line, defining that only FeatureRequire and <!-- this default project have a a sale supply line, defining that only FeatureRequire and
RequireAssistant services are available for this project --> RequireAssistant services are available for this project -->
<tr> <tr>
...@@ -48,6 +53,11 @@ RequireAssistant services are available for this project --> ...@@ -48,6 +53,11 @@ RequireAssistant services are available for this project -->
<td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td> <td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="field_your_resource"]/option[text() = "RequireAssistant"]</td>
<td></td>
</tr>
<!-- other services are not available here. --> <!-- other services are not available here. -->
<tr> <tr>
<td>waitForElementNotPresent</td> <td>waitForElementNotPresent</td>
......
...@@ -19,16 +19,31 @@ ...@@ -19,16 +19,31 @@
<td>//input[@data-i18n='[value]Submit New Support Request']</td> <td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@id='wrap1']</td> <td>//div[@id='wrap1']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@id='wrap1']</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@id='wrap2']</td> <td>//div[@id='wrap2']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@id='wrap2']</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForTextPresent</td> <td>waitForTextPresent</td>
<td>Recent Updates</td> <td>Recent Updates</td>
......
...@@ -20,6 +20,11 @@ ...@@ -20,6 +20,11 @@
<td>//input[@data-i18n='[value]Submit New Support Request']</td> <td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/paginate_next" />
<tr> <tr>
<td>refresh</td> <td>refresh</td>
......
...@@ -65,6 +65,11 @@ ...@@ -65,6 +65,11 @@
<td>//input[@data-i18n="[value]Post Comment"]</td> <td>//input[@data-i18n="[value]Post Comment"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n="[value]Post Comment"]</td>
<td></td>
</tr>
<tal:block tal:define="text_content string:Second Post Content"> <tal:block tal:define="text_content string:Second Post Content">
<tal:block metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/type_ckeditor_text_content"/> <tal:block metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/type_ckeditor_text_content"/>
...@@ -80,6 +85,11 @@ ...@@ -80,6 +85,11 @@
<td>//input[@data-i18n='[value]Post Comment' and @disabled and contains(@class, "ui-disabled")]</td> <td>//input[@data-i18n='[value]Post Comment' and @disabled and contains(@class, "ui-disabled")]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n='[value]Post Comment' and @disabled and contains(@class, "ui-disabled")]</td>
<td></td>
</tr>
<tal:block tal:define="notification_configuration python: {'class': 'success', <tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Comment added'}"> 'text': 'Comment added'}">
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
<!-- reset filter is disabled --> <!-- reset filter is disabled -->
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//input[@data-i18n="[value]Reset Filter" and @disabled]</td><td></td></tr> <td>//input[@data-i18n="[value]Reset Filter" and @disabled]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//input[@data-i18n="[value]Reset Filter" and @disabled]</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>css=#wrap2 iframe</td><td></td></tr> <td>css=#wrap2 iframe</td><td></td></tr>
...@@ -25,8 +27,12 @@ ...@@ -25,8 +27,12 @@
<td>css=#wrap2 iframe</td><td></td></tr> <td>css=#wrap2 iframe</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//canvas</td><td></td></tr> <td>//canvas</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//canvas</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//div[@class="graph-content" and not(@disabled)]</td><td></td></tr> <td>//div[@class="graph-content" and not(@disabled)]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//div[@class="graph-content" and not(@disabled)]</td><td></td></tr>
<tr><td>storeEval</td> <tr><td>storeEval</td>
<td>selenium.browserbot.getCurrentWindow().echarts.getInstanceByDom( <td>selenium.browserbot.getCurrentWindow().echarts.getInstanceByDom(
...@@ -150,6 +156,8 @@ and compare real click with simulated clicks. ...@@ -150,6 +156,8 @@ and compare real click with simulated clicks.
<!-- reset filter is now enabled --> <!-- reset filter is now enabled -->
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//input[@data-i18n="[value]Reset Filter" and not(@disabled)]</td><td></td></tr> <td>//input[@data-i18n="[value]Reset Filter" and not(@disabled)]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//input[@data-i18n="[value]Reset Filter" and not(@disabled)]</td><td></td></tr>
<tr><td>assertTextNotPresent</td> <tr><td>assertTextNotPresent</td>
<td>123dsfa</td> <td>123dsfa</td>
<td></td></tr> <td></td></tr>
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
<!-- reset filter is disabled --> <!-- reset filter is disabled -->
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//input[@data-i18n="[value]Reset Filter" and @disabled]</td><td></td></tr> <td>//input[@data-i18n="[value]Reset Filter" and @disabled]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//input[@data-i18n="[value]Reset Filter" and @disabled]</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>css=#wrap1 iframe</td><td></td></tr> <td>css=#wrap1 iframe</td><td></td></tr>
...@@ -26,8 +27,12 @@ ...@@ -26,8 +27,12 @@
<td>css=#wrap1 iframe</td><td></td></tr> <td>css=#wrap1 iframe</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//canvas</td><td></td></tr> <td>//canvas</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//canvas</td><td></td></tr>
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//div[@class="graph-content" and not(@disabled)]</td><td></td></tr> <td>//div[@class="graph-content" and not(@disabled)]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//div[@class="graph-content" and not(@disabled)]</td><td></td></tr>
<tr><td>storeEval</td> <tr><td>storeEval</td>
<td>selenium.browserbot.getCurrentWindow().echarts.getInstanceByDom( <td>selenium.browserbot.getCurrentWindow().echarts.getInstanceByDom(
...@@ -152,6 +157,8 @@ The approximated formula (by trial and error, so it migth be just wrong) is: ...@@ -152,6 +157,8 @@ The approximated formula (by trial and error, so it migth be just wrong) is:
<!-- reset filter is now enabled --> <!-- reset filter is now enabled -->
<tr><td>waitForElementPresent</td> <tr><td>waitForElementPresent</td>
<td>//input[@data-i18n="[value]Reset Filter" and not(@disabled)]</td><td></td></tr> <td>//input[@data-i18n="[value]Reset Filter" and not(@disabled)]</td><td></td></tr>
<tr><td>assertElementPresent</td>
<td>//input[@data-i18n="[value]Reset Filter" and not(@disabled)]</td><td></td></tr>
<tr><td>click</td> <tr><td>click</td>
<td>//input[@data-i18n="[value]Reset Filter"]</td><td></td></tr> <td>//input[@data-i18n="[value]Reset Filter"]</td><td></td></tr>
......
...@@ -19,11 +19,21 @@ ...@@ -19,11 +19,21 @@
<td>//input[@data-i18n='[value]Submit New Support Request']</td> <td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n="Support Requests"]</td> <td>//a[@data-i18n="Support Requests"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//a[@data-i18n="Support Requests"]</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n="Support Requests"]</td> <td>//a[@data-i18n="Support Requests"]</td>
...@@ -34,6 +44,11 @@ ...@@ -34,6 +44,11 @@
<td>//a[contains(text(), "Actions")]</td> <td>//a[contains(text(), "Actions")]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//a[contains(text(), "Actions")]</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(text(), "Actions")]</td> <td>//a[contains(text(), "Actions")]</td>
...@@ -45,6 +60,11 @@ ...@@ -45,6 +60,11 @@
<td>//a[contains(text(), "Generate RSS")]</td> <td>//a[contains(text(), "Generate RSS")]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//a[contains(text(), "Generate RSS")]</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(text(), "Generate RSS")]</td> <td>//a[contains(text(), "Generate RSS")]</td>
...@@ -55,6 +75,11 @@ ...@@ -55,6 +75,11 @@
<td>//button[contains(text(), "Copy to Clipboard")]</td> <td>//button[contains(text(), "Copy to Clipboard")]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//button[contains(text(), "Copy to Clipboard")]</td>
<td></td>
</tr>
<tr> <tr>
<td>assertValue</td> <td>assertValue</td>
<td>//div[@data-gadget-scope="text_field"]/input</td> <td>//div[@data-gadget-scope="text_field"]/input</td>
......
...@@ -19,11 +19,21 @@ ...@@ -19,11 +19,21 @@
<td>//input[@data-i18n='[value]Submit New Support Request']</td> <td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//button[@class="search_button ui-btn-icon-notext ui-icon-search"]</td> <td>//button[@class="search_button ui-btn-icon-notext ui-icon-search"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//button[@class="search_button ui-btn-icon-notext ui-icon-search"]</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//button[@class="search_button ui-btn-icon-notext ui-icon-search"]</td> <td>//button[@class="search_button ui-btn-icon-notext ui-icon-search"]</td>
......
...@@ -20,14 +20,44 @@ ...@@ -20,14 +20,44 @@
<td>//input[@data-i18n='[value]Submit New Support Request']</td><td></td></tr> <td>//input[@data-i18n='[value]Submit New Support Request']</td><td></td></tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//input[@name='field_your_title']</td>
<td></td>
</tr>
<tr><td>type</td> <tr><td>type</td>
<td>//input[@name='field_your_title']</td> <td>//input[@name='field_your_title']</td>
<td>testLatestPostOnFrontPage</td></tr> <td>testLatestPostOnFrontPage</td></tr>
<!-- Wait for the gadget to update the resource according to the project type,
this done by an ajax call.-->
<tr>
<td>waitForElementPresent</td>
<td>//option[@text="BugReport"]</td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//option[@text="BugReport"]</td>
</tr>
<tr><td>select</td> <tr><td>select</td>
<td>field_your_project</td> <td>field_your_project</td>
<td>RobotMaking</td></tr> <td>RobotMaking</td>
<tr><td>waitForTextPresent</td> </tr>
<td>FeatureRequire</td></tr> <tr>
<td>waitForElementNotPresent</td>
<td>//option[@text="BugReport"]</td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//option[@text="BugReport"]</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//option[@text="FeatureRequire"]</td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//option[@text="FeatureRequire"]</td>
</tr>
<tr><td>select</td> <tr><td>select</td>
<td>field_your_resource</td> <td>field_your_resource</td>
<td>FeatureRequire</td></tr> <td>FeatureRequire</td></tr>
...@@ -44,7 +74,9 @@ ...@@ -44,7 +74,9 @@
<tr><td>waitForText</td> <tr><td>waitForText</td>
<td>//ol[@id="post_list"]//li/p</td> <td>//ol[@id="post_list"]//li/p</td>
<td>Post test</td></tr> <td>Post test</td></tr>
<tr><td>assertText</td>
<td>//ol[@id="post_list"]//li/p</td>
<td>Post test</td></tr>
<tr><td colspan="3"><b>Go back ot front page and check "latest post" columns</b></td></tr> <tr><td colspan="3"><b>Go back ot front page and check "latest post" columns</b></td></tr>
<tr><td>openAndWait</td> <tr><td>openAndWait</td>
......
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
<td>name=Base_createCloneDocument:method</td> <td>name=Base_createCloneDocument:method</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>name=Base_createCloneDocument:method</td>
<td></td>
</tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
<td>name=Base_createCloneDocument:method</td> <td>name=Base_createCloneDocument:method</td>
......
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
<td>//a[@data-i18n="Support Requests"]</td> <td>//a[@data-i18n="Support Requests"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//a[@data-i18n="Support Requests"]</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n="Support Requests"]</td> <td>//a[@data-i18n="Support Requests"]</td>
...@@ -29,6 +34,11 @@ ...@@ -29,6 +34,11 @@
<td>//div[@role="main"]//div[@data-gadget-url="${base_url}/web_site_module/erp5_officejs_support_request_ui/gadget_erp5_searchfield.html"]//input[@name="search"]</td> <td>//div[@role="main"]//div[@data-gadget-url="${base_url}/web_site_module/erp5_officejs_support_request_ui/gadget_erp5_searchfield.html"]//input[@name="search"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@role="main"]//div[@data-gadget-url="${base_url}/web_site_module/erp5_officejs_support_request_ui/gadget_erp5_searchfield.html"]//input[@name="search"]</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//div[@role="main"]//div[@data-gadget-url="${base_url}/web_site_module/erp5_officejs_support_request_ui/gadget_erp5_searchfield.html"]//input[@name="search"]</td> <td>//div[@role="main"]//div[@data-gadget-url="${base_url}/web_site_module/erp5_officejs_support_request_ui/gadget_erp5_searchfield.html"]//input[@name="search"]</td>
...@@ -55,6 +65,11 @@ ...@@ -55,6 +65,11 @@
<td>//div[@class="document_table"]/table/tbody/tr/td[1]/a[contains(text(), "123dsfa")]</td> <td>//div[@class="document_table"]/table/tbody/tr/td[1]/a[contains(text(), "123dsfa")]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@class="document_table"]/table/tbody/tr/td[1]/a[contains(text(), "123dsfa")]</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@class="document_table"]/table/tbody/tr/td[1]/a[contains(text(), "123dsfa")]</td> <td>//div[@class="document_table"]/table/tbody/tr/td[1]/a[contains(text(), "123dsfa")]</td>
......
...@@ -22,6 +22,11 @@ ...@@ -22,6 +22,11 @@
<td>//input[@data-i18n='[value]Submit New Support Request']</td> <td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@class="document_table"]//tr/td[1]</td> <td>//div[@class="document_table"]//tr/td[1]</td>
......
...@@ -25,6 +25,11 @@ ...@@ -25,6 +25,11 @@
<td>//input[@data-i18n='[value]Submit New Support Request']</td> <td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[contains(@class, "panel")]//a</td> <td>//div[contains(@class, "panel")]//a</td>
......
...@@ -28,11 +28,21 @@ ...@@ -28,11 +28,21 @@
<td>//input[@data-i18n='[value]Submit New Support Request']</td> <td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@data-i18n='[value]Submit New Support Request']</td>
<td></td>
</tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@class="document_table"]//tr/td[1]</td> <td>//div[@class="document_table"]//tr/td[1]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@class="document_table"]//tr/td[1]</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//div[@class="document_table"]//tr/td[1]/a</td> <td>//div[@class="document_table"]//tr/td[1]/a</td>
...@@ -40,7 +50,6 @@ ...@@ -40,7 +50,6 @@
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr> <tr>
<td>assertText</td> <td>assertText</td>
<td>//div[contains(@class, "panel")]//a[contains(@class, "ui-icon-home")]</td> <td>//div[contains(@class, "panel")]//a[contains(@class, "ui-icon-home")]</td>
......
...@@ -9,36 +9,55 @@ ...@@ -9,36 +9,55 @@
<tr><td rowspan="1" colspan="3">Support Request Zuite</td></tr> <tr><td rowspan="1" colspan="3">Support Request Zuite</td></tr>
</thead><tbody> </thead><tbody>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<!-- Clean Up -->
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/ERP5Site_addManagerAclUserIfNotExisting</td> <td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>open</td> <td>assertTextPresent</td>
<td>${base_url}/web_site_module/erp5_officejs_support_request_ui/</td> <td>Reset Successfully.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>open</td>
<td>//a[@data-i18n='Logout']</td> <td>${base_url}/ERP5Site_addManagerAclUserIfNotExisting</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr> <tr>
<td>click</td> <td>open</td>
<td>//a[@data-i18n='Logout']</td> <td>${base_url}/web_site_module/erp5_officejs_support_request_ui/</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Logout'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@value='Confirm']</td> <td>//input[@value='Confirm']</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@value='Confirm']</td>
<td></td>
</tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//input[@value='Confirm']</td> <td>//input[@value='Confirm']</td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<!-- Use waitForElementPresent command to make sure we are logged out --> <!-- Use waitForElementPresent command to make sure we are logged out -->
<!-- Then access the homepage to make sure the login form still can appear --> <!-- Then access the homepage to make sure the login form still can appear -->
<tr> <tr>
...@@ -46,6 +65,11 @@ ...@@ -46,6 +65,11 @@
<td>//input[@name="WebSite_login:method"]</td> <td>//input[@name="WebSite_login:method"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@name="WebSite_login:method"]</td>
<td></td>
</tr>
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/erp5_officejs_support_request_ui/</td> <td>${base_url}/web_site_module/erp5_officejs_support_request_ui/</td>
......
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