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