Commit 71f70c7a authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui_test] Improve macros.

Clean up the macros and add description to make them more readable.
Precise where the filter/sort editors are located.
Add macros to manage the filter panel.
parent 5892dd0e
......@@ -23,7 +23,6 @@
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects</td>
......@@ -37,265 +36,106 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'title', 'value': 'Title 2', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td>index=0</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[1]//input</td>
<td>0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td>index=1</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[2]//input</td>
<td>Title 2</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tr>
<td>waitForElementNotPresent</td>
<td>link=Title 8</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>link=Title 8</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: '( id:&nbsp; &#34;0&#34; AND title:&nbsp; &#34;Title 2&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or" />
<tr>
<td>click</td>
<td>//button[text()='Filter']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name='heard_about']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//select[@name='heard_about']</td>
<td>AND</td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='heard_about']</td>
<td>index=1</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//select[@name='heard_about']</td>
<td>OR</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='filter_item_container']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tr>
<td>waitForElementPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: '( id:&nbsp; &#34;0&#34; OR title:&nbsp; &#34;Title 2&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>click</td>
<td>//button[text()='Filter']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_or" />
<tal:block tal:define="filter_section_configuration python: {'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[2]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[2]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
......
......@@ -53,45 +53,12 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td>index=0</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[1]//input</td>
<td>0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
......@@ -99,43 +66,17 @@
<td>link=Title 0</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: '( id:&nbsp; &#34;0&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='filter_item_container']</td>
<td></td>
</tr>
<tal:block tal:define="filter_section_configuration python: {'key': 'title', 'value': 'T%', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td>index=1</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[1]//input</td>
<td>T%</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
......@@ -163,44 +104,23 @@
<td>link=Title 0</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: '( title:&nbsp; &#34;T%&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
......
......@@ -54,194 +54,79 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'title', 'value': 'Title 2', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td>index=0</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[1]//input</td>
<td>0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td>index=1</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[2]//input</td>
<td>Title 2</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( id:&nbsp; &#34;0&#34; AND title:&nbsp; &#34;Title 2&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='heard_about']</td>
<td>index=1</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//select[@name='heard_about']</td>
<td>OR</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='filter_item_container']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( id:&nbsp; &#34;0&#34; OR title:&nbsp; &#34;Title 2&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_or" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tal:block tal:define="filter_section_configuration python: {'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[2]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[2]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
......
......@@ -17,13 +17,11 @@
<td>${base_url}/bar_module/ListBoxZuite_reset</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Reset Successfully.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/foo_module/FooModule_createObjects</td>
......@@ -44,7 +42,6 @@
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
......@@ -52,185 +49,37 @@
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name='heard_about']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//select[@name='heard_about']</td>
<td>AND</td>
</tr>
<tr>
<td>select</td>
<td>//select[@name='heard_about']</td>
<td>index=1</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//select[@name='heard_about']</td>
<td>OR</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='filter_item_container']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td>index=0</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[1]//input</td>
<td>0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td>index=1</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[2]//input</td>
<td>Title 2</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'title', 'value': 'Title 2', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: '( id:&nbsp; &#34;0&#34; OR title:&nbsp; &#34;Title 2&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_or" />
<tal:block tal:define="filter_section_configuration python: {'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[2]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[2]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>verifyElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
......
......@@ -52,136 +52,29 @@
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/change_filter_to_or" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tr>
<td>select</td>
<td>//select[@name='heard_about']</td>
<td>index=1</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//select[@name='heard_about']</td>
<td>OR</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td>index=0</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[1]//input</td>
<td>0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[2]//select</td>
<td>index=0</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[2]//input</td>
<td>1</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[3]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[3]//select</td>
<td>index=0</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[3]//input</td>
<td>2</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[4]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[4]//select</td>
<td>index=0</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '1', 'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[4]//input</td>
<td>3</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '2', 'index': 2}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '3', 'index': 3}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
......@@ -189,13 +82,15 @@
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: '( id:&nbsp; &#34;0&#34; OR id:&nbsp; &#34;1&#34; OR id:&nbsp; &#34;2&#34; OR id:&nbsp; &#34;3&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>click</td>
......@@ -208,14 +103,11 @@
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>link=Title 0</td>
......@@ -227,7 +119,6 @@
<td>//a[@data-i18n="Previous"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Previous"]</td>
......@@ -239,146 +130,38 @@
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>link=Title 2</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text()='Filter']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Filter']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[4]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[4]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[4]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[4]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[3]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[3]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[3]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[3]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[2]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[2]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[2]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_or" />
<tal:block tal:define="filter_section_configuration python: {'index': 3}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block tal:define="filter_section_configuration python: {'index': 2}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block tal:define="filter_section_configuration python: {'index': 1}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
......
......@@ -52,95 +52,54 @@
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tal:block tal:define="filter_section_configuration python: {'key': 'id', 'value': '0', 'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/set_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//div[@class="filter_item_container"]/div[1]//select</td>
<td>index=0</td>
</tr>
<tr>
<td>type</td>
<td>//div[@class="filter_item_container"]/div[1]//input</td>
<td>0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: '( id:&nbsp; &#34;0&#34; )'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>click</td>
<td>link=Title 0</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Editable']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Next']</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//a[@data-i18n = "Title 0"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Foo Module']</td>
......@@ -148,41 +107,16 @@
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/triggle_filter_and" />
<tal:block tal:define="filter_section_configuration python: {'index': 0}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/remove_filter_section" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@class="filter_item_container"]/div[1]//button</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//div[@class="filter_item_container"]/div[1]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_filter" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="search_query python: ''">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
......
......@@ -46,18 +46,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tr>
<td>waitForElementPresent</td>
......
......@@ -68,17 +68,7 @@
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/add_new_filter_section" />
<tr>
<td>waitForElementPresent</td>
......
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="save">
<tr>
<td colspan="3"><b>Save</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Save']</td>
<td></td>
</tr>
<!-- First loader while calling Base_edit -->
<tr>
<td>waitForElementPresent</td>
<td>//h1[@class="ui-title"]//a[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<!-- Save Button is disabled -->
<tr>
<td>verifyElementPresent</td>
<td>//button[@data-i18n="Save"][contains(@class, "ui-disabled")]</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Data updated.</td>
<td></td>
</tr>
<!-- Second loader while updating the page -->
<tr>
<td>waitForElementPresent</td>
<td>//h1[@class="ui-title"]//a[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<!-- Save Button is disabled -->
<tr>
<td>verifyElementPresent</td>
<td>//button[@data-i18n="Save"][contains(@class, "ui-disabled")]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//h1[@class="ui-title"]//a[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//button[@data-i18n="Save"][contains(@class, "ui-icon-check")]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="clear_query">
<tal:block metal:define-macro="clear_query">
<tr>
<td colspan="3"><b>Clear the search query</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Previous']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n="Filter"][contains(@class, "ui-icon-warning")]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tal:block>
<tal:block metal:define-macro="submit_search_filter">
<tr>
<td colspan="3"><b>Submit the filter panel</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n='Submit']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tal:block>
<tal:block metal:define-macro="create_translation_data">
<tr>
<td colspan="3"><b>Create the translation data</b></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/Base_createBaseLanguage</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>done</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
</tal:block>
<tal:block metal:define-macro="submit_dialog">
<tr>
<td colspan="3"><b>Submit the dialog</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_dialog.html')]</td>
......@@ -157,9 +148,15 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_dialog.html')]//input[@class='dialogconfirm' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="search_in_form_list">
<tr>
<td colspan="3"><b tal:content="python: 'Submit a form list search: %s' % search_query"></b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
......@@ -176,12 +173,12 @@
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
</tal:block>
<tal:block metal:define-macro="search_in_form_list_without_header_url">
<tr>
<td colspan="3"><b>Submit a form list search (without header URL)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//input[@name='search']</td>
......@@ -197,14 +194,13 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded_in_menu_page" />
</tal:block>
<tal:block metal:define-macro="check_search_in_form_list">
<tr>
<td colspan="3"><b tal:content="python: 'Check the search query: %s' % search_query"></b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//div[@data-gadget-scope='erp5_searchfield']//input[@name='search']</td>
......@@ -215,10 +211,15 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_list.html')]//div[@data-gadget-scope='erp5_searchfield']//input[@name='search' and @type='search']</td>
<td tal:content="search_query"></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="wait_for_content_loaded">
<tr>
<td colspan="3"><b>Wait for the content to be loaded</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//h1[@class="ui-title"]//*[contains(@class, "ui-icon-spinner")]</td>
......@@ -230,30 +231,34 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//h1[@class="ui-title"]//*[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="wait_for_content_loaded_in_menu_page">
<tal:block metal:define-macro="wait_for_content_loaded_in_menu_page">
<tr>
<td colspan="3"><b>Wait for the content to be loaded (in menu page)</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@class="ui-title"]//span[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td>//h1[@class="ui-title"]//span[contains(@class, "ui-icon-spinner")]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="toggle_editable_mode">
<tr>
<td colspan="3"><b>Toggle editable mode</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//label</td>
......@@ -264,27 +269,43 @@
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//label</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="verify_is_non_editable_mode">
<tr>
<td colspan="3"><b>Check non editable mode</b></td>
</tr>
<tr>
<td>assertNotChecked</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//input</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="verify_is_editable_mode">
<tr>
<td colspan="3"><b>Check editable mode</b></td>
</tr>
<tr>
<td>assertChecked</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_panel.html')]//div[contains(@data-gadget-url, 'gadget_erp5_field_multicheckbox.html')]//input</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="go_to_foo_relation_field_view">
<tr>
<td colspan="3"><b>Go to relation field view</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
......@@ -295,29 +316,30 @@
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//ul[@class='document-listview']//a[@data-i18n='Relation Fields']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class='document-listview']//a[@data-i18n='Relation Fields']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_my_id']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="go_to_foo_dummy_list_field_view">
<tr>
<td colspan="3"><b>Go to dummy list field view</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
......@@ -328,30 +350,30 @@
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//ul[@class='document-listview']//a[@data-i18n='Dummy List Field Report']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class='document-listview']//a[@data-i18n='Dummy List Field Report']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_dialog.html')]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="go_to_bar_datetime_field_view">
<tr>
<td colspan="3"><b>Go to datetime field view</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
......@@ -362,33 +384,30 @@
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//ul[@class='document-listview']//a[@data-i18n='DateTimeField']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class='document-listview']//a[@data-i18n='DateTimeField']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_my_start_date']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="go_to_bar_dummy_multicheckbox_field_report_view">
<tr>
<td colspan="3"><b>Go to dummy multicheckbox field view</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
......@@ -399,31 +418,30 @@
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//ul[@class='document-listview']//a[@data-i18n='Dummy Multicheckbox Field Report']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class='document-listview']//a[@data-i18n='Dummy Multicheckbox Field Report']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_dialog.html')]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="go_to_foo_dummy_multilist_field_report_view">
<tr>
<td colspan="3"><b>Go to dummy multilistfield field view</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
......@@ -434,111 +452,212 @@
<td>//div[contains(@class, 'ui-header')]//a[@data-i18n='Views']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//ul[@class='document-listview']//a[@data-i18n='Dummy Multilist Field Report']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//ul[@class='document-listview']//a[@data-i18n='Dummy Multilist Field Report']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_pt_form_dialog.html')]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="triggle_filter_and">
<tr>
<td colspan="3"><b>Open the filter panel in AND mode</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text()='Filter']</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//button[text()='Filter']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Filter']</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//button[text()='Filter']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name='heard_about']</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//select[@name='heard_about']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//select[@name='heard_about']</td>
<td>AND</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//select[@name='heard_about']</td>
<td>AND</td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="triggle_filter_or">
<tr>
<td colspan="3"><b>Open the filter panel in OR mode</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[text()='Filter']</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//button[text()='Filter']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[text()='Filter']</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_header.html')]//button[text()='Filter']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name='heard_about']</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//select[@name='heard_about']</td>
<td></td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//select[@name='heard_about']</td>
<td>OR</td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tr>
<td>verifyValue</td>
<td>//select[@name='heard_about']</td>
<td>OR</td>
</tr>
<tal:block metal:define-macro="add_new_filter_section">
<tr>
<td colspan="3"><b>Click on the + icon in the filter panel</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="triggle_sort">
<tr>
<td colspan="3"><b>Open the sort panel</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n='Sort']</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Sort']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_field_listbox.html')]//button[@data-i18n='Sort']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_sort_editor.html')]//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tr>
<td>click</td>
<td>//button[@data-i18n='Sort']</td>
<td></td>
</tr>
<tal:block metal:define-macro="set_filter_section">
<tr>
<td colspan="3"><b tal:content="python: 'Set the filter section %(index)i to %(key)s - %(value)s' % filter_section_configuration"></b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]//select' % (filter_section_configuration['index'] + 1)"></td>
<td></td>
</tr>
<tr>
<td>select</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]//select' % (filter_section_configuration['index'] + 1)"></td>
<td tal:content="python: 'value=%s' % filter_section_configuration['key']"></td>
</tr>
<tr>
<td>type</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]//input' % (filter_section_configuration['index'] + 1)"></td>
<td tal:content="python: filter_section_configuration['value']"></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//button[@class='plus ui-btn-c ui-override-theme ui-btn ui-icon-plus ui-btn-icon-left ui-corner-all']</td>
<td></td>
</tr>
<tal:block metal:define-macro="submit_filter">
<tr>
<td colspan="3"><b>Submit the filter panel</b></td>
</tr>
<tr>
<td>click</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//button[@class="submit responsive ui-last-child ui-btn ui-btn-icon-left ui-icon-check"]</td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="change_filter_to_or">
<tr>
<td colspan="3"><b>Change the filter to OR mode</b></td>
</tr>
<tr>
<td>select</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//select[@name='heard_about']</td>
<td>index=1</td>
</tr>
<tr>
<td>verifyValue</td>
<td>//div[contains(@data-gadget-url, 'gadget_erp5_search_editor.html')]//select[@name='heard_about']</td>
<td>OR</td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
<tal:block metal:define-macro="remove_filter_section">
<tr>
<td colspan="3"><b tal:content="python: 'Remove the filter section %(index)i' % filter_section_configuration"></b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]' % (filter_section_configuration['index'] + 1)"></td>
<td></td>
</tr>
<tr>
<td>focus</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]//button' % (filter_section_configuration['index'] + 1)"></td>
<td></td>
</tr>
<tr>
<td>click</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]//button' % (filter_section_configuration['index'] + 1)"></td>
<td></td>
</tr>
<tr>
<td>waitForElementNotPresent</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_erp5_search_editor.html\')]//div[@class=\'filter_item_container\']/div[%i]' % (filter_section_configuration['index'] + 1)"></td>
<td></td>
</tr>
<tr>
<td colspan="3"><p></p></td>
</tr>
</tal:block>
</tal:block>
\ 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