Commit 9ee572fe authored by Ivan Tyagov's avatar Ivan Tyagov

erp5_wendelin_tutorial_ui_test: fix tutorial tests

See merge request !87
parents d423a31e bcf8009f
......@@ -248,6 +248,19 @@
<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>
</tbody>
</table>
</test>
......
......@@ -12,7 +12,8 @@
<td>${base_url}/Zuite_setUpPersonTest</td>
<td></td>
</tr>
<tr>
</tr>
<td>verifyTextPresent</td>
<td>Init Ok</td>
<td></td>
......@@ -235,6 +236,18 @@
<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>
</tbody>
</table>
</test>
......
......@@ -338,6 +338,19 @@
<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>
......
......@@ -76,6 +76,36 @@
<test>
<table style="display: none;" class="test">
<tbody>
<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}/Zuite_callHandleAnalysisAlarm</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Alarm Called.</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_x}/web_site_module/default_wendelin_front/</td>
......@@ -107,12 +137,7 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>waitForTextPresent</td>
<td>Total size (bytes)</td>
<td></td>
</tr>
......
......@@ -266,6 +266,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>
</tbody>
</table>
</test>
......@@ -533,6 +543,11 @@
<td>//a[contains(@href,'page=portal_callables')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()="IngestionPolicy_parseSimpleIngestionTag"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Add"]</td>
......@@ -563,7 +578,6 @@
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_title"]</td>
......@@ -574,6 +588,11 @@
<td>//input[@id="field_my_title"]</td>
<td>DataAnalysisLine_convertEnvironmentDataStreamToArray</td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_reference"]</td>
......@@ -584,6 +603,11 @@
<td>//input[@id="field_my_reference"]</td>
<td>DataAnalysisLine_convertEnvironmentDataStreamToArray</td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Save"]</td>
......@@ -598,7 +622,69 @@
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @class="success"]</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_x}/web_site_module/default_wendelin_front/</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href,'page=portal_callables')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(@href,'page=portal_callables')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[text()='DataAnalysisLine_convertEnvironmentDataStreamToArray']</td>
<td></td>
</tr>
<td>click</td>
<td>//a[text()='DataAnalysisLine_convertEnvironmentDataStreamToArray']</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Python Script: DataAnalysisLine_convertEnvironmentDataStreamToArray"]</td>
<td></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>//label[@for="field_my_reference"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_id"]</td>
......@@ -609,6 +695,26 @@
<td>//input[@id="field_my_id"]</td>
<td>DataAnalysisLine_convertEnvironmentDataStreamToArray</td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Save"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Save"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Save"]</td>
......@@ -739,8 +845,10 @@ if end &lt; in_data_stream.getSize():
<tr>
<td>type</td>
<td>//div[contains(@data-gadget-url,'gadget_editor.html')]//textarea</td>
<!--<td>//pre[@class=" CodeMirror-line " and @role="presentation"]</td>-->
<td>import pandas as pd
<!--td>//pre[@class=" CodeMirror-line " and @role="presentation"]</td-->
<td>
<pre>
import pandas as pd
progress_indicator = in_stream[&quot;Progress Indicator&quot;]
in_data_stream = in_stream[&quot;Data Stream&quot;]
......@@ -755,7 +863,7 @@ f = in_data_stream.extractDateTime
df = pd.DataFrame((dict(**o[1]) for o in unpacked), dtype=&quot;float64&quot;, index=(f(o[0]) for o in unpacked))
if df.shape[0] == 0:
&nbsp; return
return
df.index.name=&quot;date&quot;
......@@ -763,17 +871,18 @@ ndarray = df.to_records(convert_datetime64=False)
zbigarray = out_data_array.getArray()
if zbigarray is None:
&nbsp; zbigarray = out_data_array.initArray(shape=(0,), dtype=ndarray.dtype.fields)
zbigarray = out_data_array.initArray(shape=(0,), dtype=ndarray.dtype.fields)
zbigarray.append(ndarray)
if end &gt; start:
&nbsp; progress_indicator.setIntOffsetIndex(end)
progress_indicator.setIntOffsetIndex(end)
# tell caller to create new activity after processing if we did not reach end of stream
if end &lt; in_data_stream.getSize():
&nbsp; return 1
</td>
return 1
</pre>
</td>
</tr>
<tr>
<td>waitForElementPresent</td>
......@@ -1546,6 +1655,20 @@ if end &lt; in_data_stream.getSize():
<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>
</tbody>
</table>
</test>
......@@ -1590,8 +1713,59 @@ if end &lt; in_data_stream.getSize():
<td></td>
</tr>
<tr>
<td>pause</td>
<td>350000</td>
<td>openAndWait</td>
<td>${base_url}/Zuite_callHandleAnalysisAlarm</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Alarm Called.</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>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_callHandleAnalysisAlarm</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Alarm Called.</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_x}/web_site_module/default_wendelin_front/</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href,'page=front')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(@href,'page=front')]</td>
<td></td>
</tr>
<tr>
......@@ -1657,6 +1831,32 @@ if end &lt; in_data_stream.getSize():
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_callHandleAnalysisAlarm</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Alarm Called.</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_x}/web_site_module/default_wendelin_front/</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href,'page=front')]</td>
......@@ -1667,6 +1867,7 @@ if end &lt; in_data_stream.getSize():
<td>//a[contains(@href,'page=front')]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href,'data_array_module')]</td>
......@@ -1692,11 +1893,6 @@ if end &lt; in_data_stream.getSize():
<td>//div[@class='document_table']//table//tbody//tr//td[1]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>350000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href,'preview')]</td>
......
......@@ -59,6 +59,14 @@
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>contributor/person_module/functional_test_tutorial_username</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
......
......@@ -59,6 +59,14 @@
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>contributor/person_module/functional_test_username</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
......
......@@ -2,9 +2,6 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment"&gt;init&lt;/span&gt;</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
......@@ -12,19 +9,116 @@
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_setUpPersonTest</td>
<td>${base_url}/Zuite_createFunctionalTestUserForTutorial</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>assertTextPresent</td>
<td>Done.</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>
<td>openAndWait</td>
<td>${base_url}/Zuite_waitForActivities</td>
<td></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>
<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>
<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>
......@@ -388,12 +482,39 @@ plot();</code>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></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>
<td></td>
</tr>
<tr>
<td>click</td>
<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>
......@@ -401,13 +522,15 @@ plot();</code>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[contains(@class,'CodeMirror')]//div//textarea</td>
<td>//div[contains(@data-gadget-url,'gadget_editor.html')]//textarea</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//div[contains(@class,'CodeMirror')]//div//textarea</td>
<td>%% md
<td>//div[contains(@data-gadget-url,'gadget_editor.html')]//textarea</td>
<td>
<pre>
%% md
# Time Series
&lt;div class=&quot;plot_div&quot; id=&quot;plot_div&quot;/&gt;
......@@ -610,6 +733,7 @@ function plot () {
&nbsp; &nbsp; });
}
plot();
</pre>
</td>
</tr>
<tr>
......@@ -634,7 +758,7 @@ plot();
</tr>
<tr>
<td>click</td>
<td>//input[@id="editable" and @type="checkbox"]</td>
<td>//a[text()="View"]</td>
<td></td>
</tr>
<tr>
......
......@@ -59,6 +59,14 @@
</tuple>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>contributor/person_module/functional_test_tutorial_username</string>
</tuple>
</value>
</item>
<item>
<key> <string>content_md5</string> </key>
<value>
......
<section>
<!--<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment"&gt;init&lt;/span&gt;</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>
</tr>
</tbody>
</table>
</test>-->
<h1>Agenda</h1>
<ul>
......@@ -72,16 +47,44 @@
<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}/logout</td>
<td>${base_url_x}/logout</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/erp5/web_site_module/default_wendelin_data_lake/#/?page=register</td>
<td>${base_url_x}/web_site_module/default_wendelin_data_lake/</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[@data-i18n="Register"]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Wendelin Data Lake Sharing Platform</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[@data-i18n="Register"]</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@name="your_first_name"]</td>
......@@ -133,15 +136,15 @@
<td></td>
</tr>
<tr>
<!--tr>
<td>openAndWait</td>
<td>${base_url}/login_form</td>
<td>${base_url_x}/login_form</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>//input[@name="__ac_name"]</td>
<td>functional_test_username</td>
<td>functional_test_tutorial_username</td>
</tr>
<tr>
<td>type</td>
......@@ -155,25 +158,28 @@
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/erp5/view</td>
<td>${base_url_x}/view</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>20000</td>
<td>assertTextPresent</td>
<td>functional_test_tutorial_username</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/erp5/portal_activities/</td>
<td>${base_url_x}/Zuite_callHandleAnalysisAlarm</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//table//tbody//tr[1]//td[2]//a</td>
<td>assertTextPresent</td>
<td>Alarm Called.</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>2000</td>
......@@ -182,7 +188,7 @@
<tr>
<td>openAndWait</td>
<td>${base_url}/erp5/event_module/</td>
<td>${base_url_x}/event_module/</td>
<td></td>
</tr>
<tr>
......@@ -227,7 +233,7 @@
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/erp5/portal_activities/</td>
<td>${base_url_x}/portal_activities/</td>
<td></td>
</tr>
<tr>
......@@ -243,12 +249,12 @@
<tr>
<td>openAndWait</td>
<td>${base_url}/logout</td>
<td>${base_url_x}/logout</td>
<td></td>
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/login_form</td>
<td>${base_url_x}/login_form</td>
<td></td>
</tr>
<tr>
......@@ -273,14 +279,14 @@
</tr>
<tr>
<td>openAndWait</td>
<td>${base_url}/erp5/view</td>
<td>${base_url_x}/view</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>TestReference</td>
<td></td>
</tr>
</tr-->
</tbody>
</table>
</test>
......
wendelin_handle_analysis = context.getPortalObject().portal_alarms.wendelin_handle_analysis
wendelin_handle_analysis.activeSense()
return 'Alarm Called.'
<?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_callHandleAnalysisAlarm</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""
Creates the functional test user, validate and open assignment.
"""
portal = context.getPortalObject()
howto_dict = context.Zuite_getHowToInfo()
functional_test_username = 'functional_test_tutorial_username'
person = getattr(portal.person_module, functional_test_username, None)
if person is None:
person = portal.person_module.newContent(portal_type='Person',
id=functional_test_username,
title=functional_test_username)
person.edit(reference=functional_test_username,
default_email_text=howto_dict['functional_test_user_email'])
person.validate()
assignment = person.newContent(portal_type='Assignment',
start_date='01/01/2011',
stop_date='01/01/2111',
function='company/manager')
assignment.open()
login = person.newContent(
portal_type='ERP5 Login',
reference=functional_test_username,
password='secret',
)
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())
return 'Done.'
<?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>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_createFunctionalTestUserForTutorial</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -62,7 +62,7 @@ class TestZeleniumRunTutorialTests(ERP5TypeFunctionalTestCase):
'erp5_simulation', 'erp5_accounting',
'erp5_jquery', 'erp5_dms', 'erp5_jquery_ui', 'erp5_web',
'erp5_slideshow_style', 'erp5_knowledge_pad', 'erp5_run_my_doc',
'erp5_user_tutorial_ui_test', 'erp5_user_tutorial','erp5_wendelin_tutorial_ui_test',)
'erp5_user_tutorial_ui_test', 'erp5_user_tutorial','erp5_wendelin_tutorial_ui_test','erp5_wendelin_data_lake_ui')
def test_suite():
suite = unittest.TestSuite()
......
......@@ -6,6 +6,12 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>default_reference</string> </key>
<value> <string>testFunctionalRunTutorialTests</string> </value>
......@@ -55,13 +61,28 @@
<item>
<key> <string>workflow_history</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
......@@ -74,7 +95,7 @@
<item>
<key> <string>component_validation_workflow</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
</dictionary>
......@@ -83,7 +104,7 @@
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle>
......
......@@ -5,6 +5,7 @@ erp5_wendelin
erp5_web_renderjs_ui
erp5_ui_test
erp5_wendelin_data_lake_ingestion
erp5_wendelin_data_lake_ui
erp5_credential
erp5_wendelin_data_lake_ingestion_default_security_model
erp5_wendelin_configurator
......
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