Commit ee1c8787 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui_test] Precise where the form_list search is located

parent 5804999a
......@@ -25,16 +25,9 @@
</tr>
<!-- Enter a search query to store the state -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>pause</td>
<td>1000</td>
......@@ -82,18 +75,17 @@
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td>waitForTextPresent</td>
<td>Foo Module</td>
<td></td>
</tr>
<!-- Wait for gadget to be loaded -->
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
</tbody></table>
</body>
</html>
\ No newline at end of file
......@@ -30,16 +30,9 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextNotPresent</td>
......@@ -83,16 +76,9 @@
<td>//div[@data-gadget-scope='header']//a[text()='Add' and contains(@href, '#!change') and contains(@href, 'view%3Dcreate_a_document')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//button[text()='Proceed' and @type='submit']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Views' and contains(@href, '#!change') and contains(@href, 'n.page=tab')]</td>
......@@ -188,11 +174,11 @@
<td>Foos</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
......
......@@ -63,16 +63,9 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 3</td>
......
......@@ -30,17 +30,9 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 1</td>
......@@ -90,11 +82,9 @@
<td>Foos</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
......
......@@ -30,16 +30,9 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextNotPresent</td>
<td>Title 1</td>
......@@ -89,11 +82,9 @@
<td>Foos</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//input[@value='title' and @type='search' and @name='search']</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/check_search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
......
......@@ -63,16 +63,9 @@
</tr>
<!-- Enter a search query to create a selection parameter -->
<tr>
<td>type</td>
<td>search</td>
<td>title</td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
<tal:block tal:define="search_query python: 'title'">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/search_in_form_list" />
</tal:block>
<tr>
<td>waitForTextNotPresent</td>
......
......@@ -145,4 +145,36 @@
</tr>
</tal:block>
<tal:block metal:define-macro="search_in_form_list">
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']//input[@name='search']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']//input[@name='search']</td>
<td tal:content="search_query"></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']//div[@data-gadget-scope='erp5_searchfield']//button[contains(@class, 'search_button')]</td>
<td></td>
</tr>
</tal:block>
<tal:block metal:define-macro="check_search_in_form_list">
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']//input[@name='search']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td tal:content="python: &quot;//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']//div[@data-gadget-scope='erp5_searchfield']//input[@value='%s' and @type='search' and @name='search']&quot; % search_query"></td>
<td></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