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