Commit de9d32c4 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio_ui_test: Add functional tests for Site/Project/Network

parent ec5fc9c8
...@@ -9,127 +9,13 @@ ...@@ -9,127 +9,13 @@
<thead> <thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr> <tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody> </thead><tbody>
<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_SlapOSCommonTemplate/macros/slapos_init" />
<tr> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_login" />
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/ERP5Site_setupDummyMailHost</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>True</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/ERP5Site_removeTestUserList</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" /> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_front_page" />
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${base_url}/web_site_module/hostingjs/ERP5Site_createTestUserList</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities" />
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<!-- Logout -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/hostingjs/WebSite_logout</td>
<td></td>
</tr>
<!-- Initialize -->
<tr>
<td>open</td>
<td>${base_url}/web_site_module/hostingjs/</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>__ac_name</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>__ac_name</td>
<td>demo_functional_user</td>
</tr>
<tr>
<td>type</td>
<td>__ac_password</td>
<td>demo_functional_user</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<!-- Dashboard -->
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n='Dashboard']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n='Sites']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n='Pending Tickets to Process']</td>
<td></td>
</tr>
<!-- Check if map is ok -->
<tr>
<td>waitForElementPresent</td>
<td>//a[@class='leaflet-control-zoom-out']</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td>5000</td>
</tr>
<!-- Access Menu --> <!-- Access Menu -->
<tr> <tr>
...@@ -443,33 +329,7 @@ ...@@ -443,33 +329,7 @@
<td></td> <td></td>
</tr> </tr>
<!-- Logout --> <tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_logout" />
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Logout']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n='Logout']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@value='Confirm']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@value='Confirm']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@value='Login']</td>
<td></td>
</tr>
</tbody></table> </tbody></table>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSNetwork</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test SlapJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_init" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_login" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_front_page" />
<!-- Sites -->
<tr>
<td>click</td>
<td>//a[@data-i18n="Networks"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Networks']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n='Networks']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="No records"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="title"]</td>
<td>TEST-SLAPOSJS-NETWORK 0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="New Network created."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Computer Network :TEST-SLAPOSJS-NETWORK 0"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="title"]</td>
<td>TEST-SLAPOSJS-NETWORK 1</td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="Data Updated"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td>5000</td>
</tr>
<!-- check site -->
<!-- Broken history to return
<tr>
<td>click</td>
<td>//a[@data-i18n="Site : TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
-->
<tr>
<td>click</td>
<td>//a[@data-i18n="Networks"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Networks']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n='Networks']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="1 Records"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-NETWORK 1"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-NETWORK 1"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Computer Network :TEST-SLAPOSJS-NETWORK 1"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Delete"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Delete"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Delete Network: TEST-SLAPOSJS-NETWORK 1"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="Network is Deleted."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="No records"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_logout" />
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSProject</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test SlapJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_init" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_login" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_front_page" />
<!-- Projects -->
<tr>
<td>click</td>
<td>//a[@data-i18n="Projects"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Projects']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n='Projects']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="No records"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="title"]</td>
<td>TEST-SLAPOSJS-PROJECT 0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="New Project created."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Project : TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//textarea[@id="description"]</td>
<td>TEST-SLAPOSJS-PROJECT DESCRIPTION</td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="Data Updated"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td>5000</td>
</tr>
<!-- check site -->
<!-- Broken history to return
<tr>
<td>click</td>
<td>//a[@data-i18n="Project : TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
-->
<tr>
<td>click</td>
<td>//a[@data-i18n="Projects"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Projects']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n='Projects']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="1 Records"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</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>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Project : TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Delete"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Delete"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Delete Project: TEST-SLAPOSJS-PROJECT 0"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="Project is Deleted."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="No records"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_logout" />
</tbody></table>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSlapOSJSSite</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test SlapJS UI</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Test RenderJS UI</td></tr>
</thead><tbody>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_init" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_login" />
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_wait_for_front_page" />
<!-- Sites -->
<tr>
<td>click</td>
<td>//a[@data-i18n="Sites"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Sites']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n='Sites']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="No records"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Add"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="title"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="title"]</td>
<td>TEST-SLAPOSJS-SET 0</td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="New Site created."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Site : TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="default_geographical_location_longitude"]</td>
<td>3.077475</td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="default_geographical_location_latitude"]</td>
<td>50.644353</td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Save"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="Data Updated"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class="leaflet-popup-content"]/div/a[text()="TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td>5000</td>
</tr>
<!-- check site -->
<!-- Broken history to return
<tr>
<td>click</td>
<td>//a[@data-i18n="Site : TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
-->
<tr>
<td>click</td>
<td>//a[@data-i18n="Sites"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n='Sites']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//h1[@data-i18n='Sites']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="1 Records"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[text()="TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Site : TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Delete"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Delete"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Delete Site: TEST-SLAPOSJS-SET 0"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and text()="Site is Deleted."]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//span[@data-i18n="No records"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_SlapOSCommonTemplate/macros/slapos_logout" />
</tbody></table>
</body>
</html>
\ No newline at end of file
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