Commit 489f669a authored by Boxiang Sun's avatar Boxiang Sun

erp5_wendelin_tutorial_ui_test: Stablizing fixup

parent 6beb6c47
......@@ -2,26 +2,8 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
<td>base_url_x</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_setUpPersonTest</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Init Ok</td>
<td></td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user"&gt;Login As Functional Test User&lt;/span&gt;</td>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewWendelinTestMacroLibrary/macros/init_wendelin_test_environment"&gt;Init Wendlin Test Environment&lt;/span&gt;</td>
</tr>
</tbody>
</table>
......@@ -128,7 +110,7 @@
<tbody>
<tr>
<td>openAndWait</td>
<td>${base_url_x}/web_site_module/default_wendelin_front/</td>
<td>${default_front_url}</td>
<td></td>
</tr>
<tr>
......@@ -171,8 +153,6 @@
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_title"]</td>
......
......@@ -2,27 +2,8 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
<td>base_url_x</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_setUpPersonTest</td>
<td></td>
</tr>
</tr>
<td>verifyTextPresent</td>
<td>Init Ok</td>
<td></td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user"&gt;Login As Functional Test User&lt;/span&gt;</td>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewWendelinTestMacroLibrary/macros/init_wendelin_test_environment"&gt;Init Wendlin Test Environment&lt;/span&gt;</td>
</tr>
</tbody>
</table>
......@@ -131,7 +112,7 @@
<tbody>
<tr>
<td>openAndWait</td>
<td>${base_url_x}/web_site_module/default_wendelin_front/</td>
<td>${default_front_url}</td>
<td></td>
</tr>
<tr>
......
......@@ -2,25 +2,8 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
<td>base_url_x</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_setUpPersonTest</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td></td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user"&gt;Login As Functional Test User&lt;/span&gt;</td>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewWendelinTestMacroLibrary/macros/init_wendelin_test_environment"&gt;Init Wendlin Test Environment&lt;/span&gt;</td>
</tr>
</tbody>
</table>
......@@ -81,7 +64,7 @@
<tbody>
<tr>
<td>openAndWait</td>
<td>${base_url_x}/web_site_module/default_wendelin_front/</td>
<td>${default_front_url}</td>
<td></td>
</tr>
<tr>
......@@ -245,8 +228,6 @@
<td>//li[@name='Organisation']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="field_my_source_section_title"]</td>
......@@ -267,7 +248,6 @@
<td>//li[@name='Organisation']</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="field_my_destination_title"]</td>
......@@ -304,9 +284,9 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -338,19 +318,16 @@
<td>//button[@type="submit" and @class="success"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//label[@for="field_my_translated_validation_state_title"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Validated</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_destination_section_title"]</td>
......@@ -382,9 +359,9 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -580,9 +557,9 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -595,9 +572,9 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
</tbody>
</table>
......@@ -689,16 +666,16 @@
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_title"]</td>
......@@ -745,9 +722,9 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -760,9 +737,9 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_listbox_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>verifyElementPresent</td>
......@@ -786,7 +763,7 @@
</tr>
<tr>
<td>open</td>
<td>${base_url_x}/portal_skins/erp5_wendelin_data_lake/Ingestion_ingestDataStream?reference=sensor_1-sample-environment-raw-data</td>
<td>${base_url}/Ingestion_ingestDataStream?reference=sensor_1-sample-environment-raw-data</td>
<td></td>
</tr>
<tr>
......@@ -794,16 +771,6 @@
<td>Data ingested</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>60000</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url_x}/web_site_module/default_wendelin_front/</td>
<td></td>
</tr>
</tbody>
</table>
</test>
......
......@@ -2,25 +2,8 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
<td>base_url_x</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_setUpPersonTest</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td></td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"&gt; Wait for activities &lt;/span&gt;</td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/login_as_functional_test_user"&gt;Login As Functional Test User&lt;/span&gt;</td>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewWendelinTestMacroLibrary/macros/init_wendelin_test_environment"&gt;Init Wendlin Test Environment&lt;/span&gt;</td>
</tr>
</tbody>
</table>
......@@ -123,7 +106,7 @@
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url_x}/web_site_module/default_wendelin_front/</td>
<td>${default_front_url}</td>
<td></td>
</tr>
<tr>
......
......@@ -2,123 +2,14 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
<td>base_url_x</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_createFunctionalTestUserForTutorial</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_waitForActivities</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Base_clearCache</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Cleared.</td>
<td></td>
</tr>
<!-- login with functional test user -->
<tr>
<td>openAndWait</td>
<td>${base_url}/logout</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/login_form</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>functional_test_tutorial_username</td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td>secret</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>//input[@name="logged_in:method"]</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/view</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>functional_test_tutorial_username</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_waitForActivities</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Base_clearCache</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Cleared.</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_updateUserPreference</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Init Ok.</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/view</td>
<td></td>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewWendelinTestMacroLibrary/macros/init_wendelin_test_environment"&gt;Init Wendlin Test Environment&lt;/span&gt;</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_updateUserPreferenceForTutorialTests</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Init Ok.</td>
<td></td>
</tr>
</tbody>
</table>
</test>
......@@ -429,23 +320,17 @@ plot();</code>
<tbody>
<tr>
<td>openAndWait</td>
<td>${base_url_x}/web_site_module/default_wendelin_front/</td>
<td>${default_front_url}</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href,'page=front')]</td>
<td></td>
<tr class="" style="opacity: 1;">
<td colspan="3">&lt;span metal:use-macro="container/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded"&gt;&lt;/span&gt;</td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(@href,'page=front')]</td>
<td></td>
<td colspan="3">&lt;tal:block tal:define=&quot;click_configuration python: {&#39;text&#39;: &#39;Modules&#39;}&quot;&gt; &lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link&quot;&gt; &lt;/tal:block&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
<td colspan="3">&lt;tal:block metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt; &lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -457,6 +342,11 @@ plot();</code>
<td>//a[contains(@href,'key=notebook_module')]</td>
<td></td>
</tr>
<tr>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Add"]</td>
......@@ -468,13 +358,13 @@ plot();</code>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td>waitForElementPresent</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -483,21 +373,10 @@ plot();</code>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="editable"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//input[@id="editable"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()='Edit']</td>
......@@ -508,13 +387,11 @@ plot();</code>
<td>//a[text()='Edit']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_title"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@id="field_my_title"]</td>
......@@ -543,7 +420,7 @@ js: https://cdn.plot.ly/plotly-latest.min.js
%% js
hateoas_url = &quot;${base_url_x}/web_site_module/renderjs_runner/hateoas/&quot;;
hateoas_url = &quot;${base_url}/web_site_module/renderjs_runner/hateoas/&quot;;
jio = jIO.createJIO({
&nbsp; type: &quot;erp5&quot;,
&nbsp; url: hateoas_url,
......@@ -747,9 +624,9 @@ plot();
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -762,12 +639,12 @@ plot();
<td></td>
</tr>
<tr>
<td>pause</td>
<td>20000</td>
<td></td>
<td colspan="3">&lt;tal:block
metal:use-macro=&quot;here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_content_loaded&quot;&gt;
&lt;/tal:block&gt;</td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>waitForElementPresent</td>
<td>//div[@id="plot_div"]</td>
<td></td>
</tr>
......
......@@ -4,7 +4,7 @@
portal = context.getPortalObject()
howto_dict = context.Zuite_getHowToInfo()
functional_test_username = 'functional_test_tutorial_username'
functional_test_username = howto_dict['functional_test_username']
person = getattr(portal.person_module, functional_test_username, None)
if person is None:
person = portal.person_module.newContent(portal_type='Person',
......@@ -25,12 +25,18 @@ if person is None:
login = person.newContent(
portal_type='ERP5 Login',
reference=functional_test_username,
password='secret',
password=howto_dict['functional_test_user_password'],
)
login.validate()
# XXX (lucas): These tests must be able to run on an instance without security.
for role in ('Manager','Assignee', 'Assignor', 'Associate', 'Auditor', 'Owner'):
portal.acl_users.zodb_roles.assignRoleToPrincipal(role, person.Person_getUserId())
# BBB for PAS 1.9.0 we pass a response and undo the redirect
response = container.REQUEST.RESPONSE
for role in ('Manager', 'Assignee', 'Assignor', 'Associate', 'Auditor', 'Owner'):
portal.acl_users.zodb_roles.manage_assignRoleToPrincipals(
role,
(person.Person_getUserId(),),
RESPONSE=response)
response.setStatus(200)
return 'Done.'
portal = context.getPortalObject()
dataAnalysisLine = context.portal_catalog.getResultValue(portal_type='Python Script',
title="DataAnalysisLine_convertEnvironmentDataStreamToArray")
if dataAnalysisLine is not None:
portal.portal_callables.deleteContent(dataAnalysisLine.getId())
return "Init ok."
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<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_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<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>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_transformDataSetup</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
preference_tool = context.getPortalObject().portal_preferences
preference = preference_tool.getActivePreference()
preference = preference_tool.getActiveUserPreference()
if preference is not None: # XXX: 3 is Priority.USER
preference.setPreferredTextEditor('text_area')
......
<?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>Zuite_viewWendelinTestMacroLibrary</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>
<tal:block metal:define-macro="init_wendelin_test_environment">
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()"></td>
<td>base_url</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url() + '/web_site_module/default_wendelin_data_lake/'"></td>
<td>wendelin_data_lake_url</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url() + '/web_site_module/default_wendelin_front/'"></td>
<td>default_front_url</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_setUpPersonTest</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Init Ok</td>
<td></td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3"><span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities </span></td>
</tr>
<tr class="" style="opacity: 1;">
<td colspan="3"><span metal:use-macro="container/Zuite_viewWendelinTestMacroLibrary/macros/login_as_functional_test_user">Login As Functional Test User</span></td>
</tr>
</tal:block>
<tal:block metal:define-macro="login_as_functional_test_user">
<tr>
<td colspan="3"><b>Login as functional test user</b></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_createFunctionalTestUserForTutorial</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Done.</td>
<td></td>
</tr>
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>
<tr>
<td>openAndWait</td>
<td>${base_url}/Base_clearCache</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Cleared.</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>${wendelin_data_lake_url}</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<!-- login with functional test user -->
<span metal:use-macro="container/Zuite_viewWendelinTestMacroLibrary/macros/logout">Logout</span>
<tr>
<td>click</td>
<td>//a[@data-i18n="Login"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="__ac_name"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td tal:content="python:
here.Zuite_getHowToInfo()['functional_test_username']"></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_password"]</td>
<td tal:content="python:
here.Zuite_getHowToInfo()['functional_test_user_password']"></td>
</tr>
<tr>
<td>click</td>
<td>//input[@value="Login"]</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>
<tr>
<td>openAndWait</td>
<td>${base_url}/Base_clearCache</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Cleared.</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_updateUserPreferenceForTutorialTests</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Init Ok.</td>
<td></td>
</tr>
<span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/wait_for_activities"> Wait for activities</span>
<tr>
<td>openAndWait</td>
<td>${wendelin_data_lake_url}</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
</tal:block>
<tal:block metal:define-macro="logout">
<tr>
<td colspan="3"><b>Logout</b></td>
</tr>
<!-- Logout -->
<tr>
<td>open</td>
<td>${wendelin_data_lake_url}</td>
<td></td>
</tr>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
<tal:block tal:define="click_configuration python: {'text': 'Logout'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/click_on_panel_link" />
</tal:block>
<tr>
<td>waitForElementPresent</td>
<td>//h1/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>
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_app_loaded" />
</tal:block>
\ 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