Commit aeed3e90 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio_ui_test: Improve assertion for Contextual Help

   Ensure that the links are present on the side panel.
parent 56ee4c1c
...@@ -94,58 +94,134 @@ ...@@ -94,58 +94,134 @@
<tal:block define="menu_item python: 'Tickets'; header menu_item "> <tal:block define="menu_item python: 'Tickets'; header menu_item ">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
<!-- Ensure contextual help displays fine on the panel-->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Add Tickets"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Add Tickets"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" />
<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" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
</tal:block> </tal:block>
<tal:block define="menu_item python: 'Sites'; header menu_item"> <tal:block define="menu_item python: 'Sites'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
<!-- Ensure contextual help displays fine on the panel-->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Classify Nodes"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Classify Nodes"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" />
<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" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
</tal:block> </tal:block>
<tal:block define="menu_item python: 'Projects'; header menu_item"> <tal:block define="menu_item python: 'Projects'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
<!-- Ensure contextual help displays fine on the panel-->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Add Projects"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Add Projects"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" />
<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" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
</tal:block> </tal:block>
<tal:block define="menu_item python: 'Invoices'; header menu_item"> <tal:block define="menu_item python: 'Invoices'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
<!-- Ensure contextual help displays fine on the panel-->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Payment Options"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Payment Options"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" />
<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" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
</tal:block> </tal:block>
<tal:block define="menu_item python: 'Services'; header menu_item"> <tal:block define="menu_item python: 'Services'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
<!-- Ensure contextual help displays fine on the panel-->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Use Panel"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Use Panel"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" />
<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" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
</tal:block> </tal:block>
<tal:block define="menu_item python: 'Servers'; header menu_item"> <tal:block define="menu_item python: 'Servers'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
<!-- Ensure contextual help displays fine on the panel-->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Associate Compute Nodes"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Associate Compute Nodes"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" />
<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" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
</tal:block> </tal:block>
<tal:block define="menu_item python: 'Networks'; header menu_item"> <tal:block define="menu_item python: 'Networks'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
<!-- Ensure contextual help displays fine on the panel-->
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Add Networks"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//a[@class="help" and text()="Add Networks"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" />
<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" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
</tal:block> </tal:block>
<tal:block define="menu_item python: 'Language'; header menu_item"> <tal:block define="menu_item python: 'Language'; header menu_item">
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item_language" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/access_menu_item_language" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/click_page_header" />
<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" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/check_contextual_help" />
</tal:block> </tal:block>
<tr> <tr>
......
...@@ -1172,14 +1172,25 @@ ...@@ -1172,14 +1172,25 @@
<tal:block metal:define-macro="check_contextual_help"> <tal:block metal:define-macro="check_contextual_help">
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@class="slapos_panel_extra_menu"]</td> <td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//div[@class="slapos_panel_extra_menu"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertElementPresent</td> <td>assertElementPresent</td>
<td>//div[@class="slapos_panel_extra_menu"]</td> <td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//div[@class="slapos_panel_extra_menu"]</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//dl[@class="dl-contextual-help"]</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[contains(@data-gadget-url, 'gadget_slapos_panel.html')]//dl[@class="dl-contextual-help"]</td>
<td></td>
</tr>
</tal:block> </tal:block>
<tal:block metal:define-macro="suspend_user_tickets"> <tal:block metal:define-macro="suspend_user_tickets">
......
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