Commit b4eac683 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio_ui_test: Make macros more flexible and reusable

Make web_site_id and panel_gadget_id, so we can reuse on private and custom websites.
parent dededafc
Pipeline #7892 passed with stage
in 0 seconds
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal" <tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"> xmlns:metal="http://xml.zope.org/namespaces/metal">
<tal:block metal:define-macro="slapos_init"> <tal:block metal:define-macro="slapos_init">
<tal:block tal:define="web_site_id python: 'hostingjs'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_init_base" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="slapos_login">
<tal:block tal:define="web_site_id python: 'hostingjs'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_login_base" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="slapos_login_with_another_user">
<tal:block tal:define="web_site_id python: 'hostingjs'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_login_with_another_user_base" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="slapos_wait_for_activities_and_front_page">
<tal:block tal:define="web_site_id python: 'hostingjs'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page_base" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="access_menu_item">
<tal:block tal:define="panel_gadget_id python: 'gadget_slapos_panel.html'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item_base" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="access_menu_item_account">
<tal:block tal:define="panel_gadget_id python: 'gadget_slapos_panel.html'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item_account_base" />
</tal:block>
</tal:block>
<tal:block metal:define-macro="slapos_init_base">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
...@@ -51,7 +96,7 @@ ...@@ -51,7 +96,7 @@
</tr> </tr>
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/hostingjs/ERP5Site_createTestUserList</td> <td tal:content="python:'${base_url}/web_site_module/%s/ERP5Site_createTestUserList' % web_site_id">.../ERP5Site_createTestUserList</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -70,17 +115,17 @@ ...@@ -70,17 +115,17 @@
</tal:block> </tal:block>
<tal:block metal:define-macro="slapos_login"> <tal:block metal:define-macro="slapos_login_base">
<!-- Logout --> <!-- Logout -->
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/hostingjs/WebSite_logout</td> <td tal:content="python:'${base_url}/web_site_module/%s/WebSite_logout' % web_site_id">.../WebSite_logout</td>
<td></td> <td></td>
</tr> </tr>
<!-- Initialize --> <!-- Initialize -->
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/hostingjs/</td> <td tal:content="python:'${base_url}/web_site_module/%s/' % web_site_id"></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -112,17 +157,17 @@ ...@@ -112,17 +157,17 @@
</tal:block> </tal:block>
<tal:block metal:define-macro="slapos_login_with_another_user"> <tal:block metal:define-macro="slapos_login_with_another_user_base">
<!-- Logout --> <!-- Logout -->
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/hostingjs/WebSite_logout</td> <td tal:content="python:'${base_url}/web_site_module/%s/WebSite_logout' % web_site_id"></td>
<td></td> <td></td>
</tr> </tr>
<!-- Initialize --> <!-- Initialize -->
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/hostingjs/</td> <td tal:content="python:'${base_url}/web_site_module/%s/' % web_site_id"></td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -154,7 +199,7 @@ ...@@ -154,7 +199,7 @@
</tal:block> </tal:block>
<tal:block metal:define-macro="slapos_wait_for_activities_and_front_page"> <tal:block metal:define-macro="slapos_wait_for_activities_and_front_page_base">
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> <tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
...@@ -165,7 +210,7 @@ ...@@ -165,7 +210,7 @@
</tr> </tr>
<tr> <tr>
<td>open</td> <td>open</td>
<td>${base_url}/web_site_module/hostingjs/</td> <td tal:content="python:'${base_url}/web_site_module/%s/' % web_site_id"></td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_front_page" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_front_page" />
...@@ -237,7 +282,7 @@ ...@@ -237,7 +282,7 @@
</tr> </tr>
</tal:block> </tal:block>
<tal:block metal:define-macro="access_menu_item"> <tal:block metal:define-macro="access_menu_item_base">
<tr> <tr>
<td colspan="3"><b tal:content="python: 'Access Entry on the Menu for : %s' % menu_item"> Menu Item </b></td> <td colspan="3"><b tal:content="python: 'Access Entry on the Menu for : %s' % menu_item"> Menu Item </b></td>
</tr> </tr>
...@@ -253,7 +298,7 @@ ...@@ -253,7 +298,7 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_slapos_panel.html\')]//a[@data-i18n=\'%s\']' % menu_item"></td> <td tal:content="python: '//div[contains(@data-gadget-url, \'%s\')]//a[@data-i18n=\'%s\']' % (panel_gadget_id, menu_item)"></td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_content_loaded" />
...@@ -303,7 +348,7 @@ ...@@ -303,7 +348,7 @@
</tal:block> </tal:block>
<tal:block metal:define-macro="access_menu_item_account"> <tal:block metal:define-macro="access_menu_item_account_base">
<tr> <tr>
<td colspan="3"><b tal:content="python: 'Access Entry on the Menu for Account'"> Menu Item </b></td> <td colspan="3"><b tal:content="python: 'Access Entry on the Menu for Account'"> Menu Item </b></td>
</tr> </tr>
...@@ -319,7 +364,7 @@ ...@@ -319,7 +364,7 @@
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td tal:content="python: '//div[contains(@data-gadget-url, \'gadget_slapos_panel.html\')]//a[@data-i18n=\'Account\']'"></td> <td tal:content="python: '//div[contains(@data-gadget-url, \'%s\')]//a[@data-i18n=\'Account\']' % panel_gadget_id"></td>
<td></td> <td></td>
</tr> </tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_content_loaded" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_content_loaded" />
......
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