Commit 51add531 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel_ui_test: ensure request limit the list of release/type based on allocation supply

parent 63cbd283
......@@ -51,11 +51,6 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!--tr>
<td>type</td>
<td>//input[@name='field_your_title']</td>
<td>Test Software Product</td>
</tr-->
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
......@@ -66,11 +61,6 @@
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg</td>
</tr>
<!--tr>
<td>type</td>
<td>//input[@name='field_your_software_type']</td>
<td>default</td>
</tr-->
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Product created.'}">
......@@ -79,76 +69,116 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
<td colspan="3"><b>Back to the project page</b></td>
<td colspan="3"><b>Add a software release</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Software Product: Theia'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
<tal:block tal:define="click_configuration python: {'text': 'Add Software Release'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Release created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Software Product Release Variation: https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Add a compute node</b></td>
<td colspan="3"><b>Add a software release</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Add Compute Node'}">
<tal:block tal:define="click_configuration python: {'text': 'Add Software Release'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>waitForElementPresent</td>
<td>//input[@name='field_your_product_import_json']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name='field_your_title']</td>
<td>Test Compute Node</td>
<td>//input[@name='field_your_product_import_json']</td>
<td>https://lab.nexedi.com/nexedi/slapos/raw/1.0.291/software/theia/software.cfg</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Compute Node created.'}">
'text': 'New Software Release created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Action succeeded.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td colspan="3"><b>Back to the software product</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Software Product Release Variation: https://lab.nexedi.com/nexedi/slapos/raw/1.0.291/software/theia/software.cfg'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
<tr>
<td colspan="3"><b>Back to the project page</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Software Product: Theia'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_header_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<!--tr>
<td colspan="3"><b>Supply the software release</b></td>
<tr>
<td colspan="3"><b>Add a compute node</b></td>
</tr>
<tal:block tal:define="click_configuration python: {'text': 'Supply'}">
<tal:block tal:define="click_configuration python: {'text': 'Add Compute Node'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>click</td>
<td>//input[@name='field_your_aggregate_uid']</td>
<td></td>
<td>type</td>
<td>//input[@name='field_your_title']</td>
<td>Test Compute Node</td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'Data received.'}">
'text': 'New Compute Node created.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tr>
<td>click</td>
<td>//input[@name='field_your_url_string']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block tal:define="notification_configuration python: {'class': 'success',
'text': 'New Software Installation created.'}">
'text': 'Action succeeded.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block-->
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tal:block metal:use-macro="here/Zuite_SlapOSPanelTemplate/macros/wait_for_activities" />
......@@ -177,16 +207,31 @@
<tr>
<td colspan="3"><b>Allow the release</b></td>
<td colspan="3"><b>Allow the release (should see 3 url and 2 types)</b></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Theia'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_page_link" />
</tal:block>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" />
<tr>
<td>assertElementPresent</td>
<td>//input[@name='field_matrixbox_allocable_cell_0_1_0']</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//input[@name='field_matrixbox_allocable_cell_0_2_0']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@name='field_matrixbox_allocable_cell_1_1_0']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@name='field_matrixbox_allocable_cell_0_0_0']</td>
<td>//input[@name='field_matrixbox_allocable_cell_2_0_0']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/save" />
......@@ -253,9 +298,19 @@
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<!--tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded" /-->
<tr>
<td>assertElementNotPresent</td>
<td>//input[@value='https://lab.nexedi.com/nexedi/slapos/raw/1.0.289/software/theia/software.cfg']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//input[@value='https://lab.nexedi.com/nexedi/slapos/raw/1.0.291/software/theia/software.cfg']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@name='field_your_url_string']</td>
<td>//input[@name='field_your_url_string' and @value='https://lab.nexedi.com/nexedi/slapos/raw/1.0.290/software/theia/software.cfg']</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/submit_dialog" />
......@@ -267,7 +322,17 @@
<!-- XXX TODO gadget crash if not fully loaded. Remove next wait, and fix gadget -->
<tr>
<td>waitForElementPresent</td>
<td>//textarea[@name='//initial-embedded-instance']</td>
<td>//input[@name='//resilient-clone-number']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//select[@name='software_type']//option[@value='resilient']</td>
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//select[@name='software_type']//option[@value='default']</td>
<td></td>
</tr>
<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