Commit bd890faf authored by Romain Courteaud's avatar Romain Courteaud

erp5_web_renderjs_ui_test: history page link

parent c7b43bff
......@@ -104,7 +104,7 @@
<!-- Generate links to module -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='2 (Foo)' and contains(@href, '#!display') and contains(@href, 'n.jio_key=foo_module%2F2')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='2 (Foo)' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=foo_module%2F2')]</td>
<td></td>
</tr>
<tr>
......
......@@ -50,23 +50,23 @@
<td>${base_url}/web_site_module/renderjs_runner/#/foo_module</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 1</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='field_listbox']//a[text()='Title 1' and contains(@href, '#!index')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
......@@ -75,33 +75,33 @@
<td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</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_listbox_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td>
<td></td>
</tr>
<tr>
<td>waitForTextPresent</td>
<td>Title 2</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='field_listbox']//a[text()='Title 2' and contains(@href, '#!index')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 2' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 2' and contains(@href, '#!history_previous')]</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_listbox_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td>
<td></td>
</tr>
......@@ -114,33 +114,36 @@
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_history.html']</td>
<td></td>
</tr>
<!-- Generate links to module -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='m']//li[1]//a[text()='Title 2 (Foo)' and contains(@href, '#!display') and contains(@href, 'n.jio_key=foo_module%2F2')]</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//li[1]//a[text()='Title 2 (Foo)' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=foo_module%2F2')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Title 1 (Foo)' and contains(@href, '#!display') and contains(@href, 'n.jio_key=foo_module%2F1')]</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Title 1 (Foo)' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=foo_module%2F1')]</td>
<td></td>
</tr>
<!-- Click on second one to change the order -->
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='m']//a[text()='Title 1 (Foo)' and contains(@href, '#!display') and contains(@href, 'n.jio_key=foo_module%2F1')]</td>
<td>//div[@data-gadget-scope='m']//a[text()='Title 1 (Foo)' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=foo_module%2F1')]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
......@@ -149,36 +152,25 @@
<td>//div[@data-gadget-scope='header']//a[text()='Foo: Title 1' and contains(@href, '#!history_previous')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_pt_form_list.html']</td>
<td></td>
</tr>
<!-- Go to the history tab -->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/open_menu_panel" />
<tr>
<td>click</td>
<td>//div[@data-gadget-scope='panel']//a[text()='History']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!-- Wait for gadget to be loaded -->
<tr>
<td>waitForElementPresent</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/renderjs_runner/gadget_erp5_page_history.html']</td>
<td></td>
</tr>
<!-- Generate links to module -->
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='m']//li[1]//a[text()='Title 1 (Foo)' and contains(@href, '#!display') and contains(@href, 'n.jio_key=foo_module%2F1')]</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//li[1]//a[text()='Title 1 (Foo)' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=foo_module%2F1')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Title 2 (Foo)' and contains(@href, '#!display') and contains(@href, 'n.jio_key=foo_module%2F2')]</td>
<td>assertElementPresent</td>
<td>//div[@data-gadget-scope='m']//a[text()='Title 2 (Foo)' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=foo_module%2F2')]</td>
<td></td>
</tr>
......
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