Commit f84f7b57 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio_ui_test: Test Status gadget on Projects

parent b85d575b
...@@ -30,15 +30,9 @@ ...@@ -30,15 +30,9 @@
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/save" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/save" />
<!-- check site --> <tal:block define="document_title python: 'TEST-SLAPOSJS-PROJECT-COMPUTER 0';">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/create_simple_compute_node" />
<!-- Broken history to return </tal:block>
<tr>
<td>click</td>
<td>//a[@data-i18n="Project : TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
-->
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
...@@ -91,6 +85,223 @@ ...@@ -91,6 +85,223 @@
<td>TEST-SLAPOSJS-PROJECT DESCRIPTION</td> <td>TEST-SLAPOSJS-PROJECT DESCRIPTION</td>
</tr> </tr>
<tr>
<td rowspan="1" colspan="3">Add server into the project</td>
</tr>
<tal:block define="menu_item python: 'Servers'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT-COMPUTER 0"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT-COMPUTER 0"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT-COMPUTER 0"]</td>
<td></td>
</tr>
<tal:block tal:define="header python: 'Compute Node: ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-PROJECT-COMPUTER 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tr>
<td colspan="3"><b tal:content="python: 'Transfer Compute Node to a Project'"> Menu Item </b></td>
</tr>
<tal:block tal:define="menu_action python: 'Transfer'">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_submenu_action" />
</tal:block>
<tal:block define="header python: 'Transfer Compute Node'; ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//select[@name="destination_project"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name="destination_project"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="destination_project"]</td>
<td>TEST-SLAPOSJS-PROJECT 0</td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_proceed" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Compute Node is transferred.'}">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_call_slapgrid" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_activities_and_front_page" />
<tal:block define="menu_item python: 'Projects'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-ok')]//a[contains(@href, 'COMP-') and contains(text(), 'Node')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-ok')]//a[contains(@href, 'COMP-') and contains(text(), 'Node')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tal:block tal:define="header python: 'Project : ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-PROJECT 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-ok')]//a[contains(@href, 'COMP-') and contains(text(), 'Node')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-ok')]//a[contains(@href, 'COMP-') and contains(text(), 'Node')]</td>
<td></td>
</tr>
<!-- Check on listbox -->
<tr>
<td>waitForElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-ok')]//a[contains(@href, 'COMP-') and contains(text(), 'Node')]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//td//div[contains(@class, 'main-status')]//div[contains(@class, 'ui-btn-ok')]//a[contains(@href, 'COMP-') and contains(text(), 'Node')]</td>
<td></td>
</tr>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT-COMPUTER 0"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT-COMPUTER 0"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT-COMPUTER 0"]</td>
<td></td>
</tr>
<tal:block tal:define="header python: 'Compute Node: ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-PROJECT-COMPUTER 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tr>
<td colspan="3"><b> Update Allocation Scope</b></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//select[@id="allocation_scope"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@id="allocation_scope"]</td>
<td></td>
</tr>
<tr>
<td>select</td>
<td>//select[@id="allocation_scope"]</td>
<td tal:content="python: '%s' % (here.Base_translateString('Closed forever', lang=lang))"></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/save" />
<tal:block define="menu_item python: 'Projects'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
</tal:block>
<tal:block tal:define="pagination_configuration python: {'header': '(1)', 'footer': '${count} Records'};
dummy python: context.REQUEST.set('mapping', {'count': '1'})">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_listbox_pagination_text" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tal:block tal:define="header python: 'Project : ${title}';
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-PROJECT 0'}) ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/assert_page_header" />
</tal:block>
<tal:block tal:define="delete_configuration python: {'header_title': 'Delete Project: ${title}', <tal:block tal:define="delete_configuration python: {'header_title': 'Delete Project: ${title}',
'notification_text': 'Project is Deleted.'}; 'notification_text': 'Project is Deleted.'};
dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-PROJECT 0'})"> dummy python: context.REQUEST.set('mapping', {'title': 'TEST-SLAPOSJS-PROJECT 0'})">
......
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