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>
...@@ -120,7 +145,7 @@ ...@@ -120,7 +145,7 @@
<td>verifyTextPresent</td> <td>verifyTextPresent</td>
<td>Validated</td> <td>Validated</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>verifyTextPresent</td> <td>verifyTextPresent</td>
<td>26205759</td> <td>26205759</td>
......
...@@ -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,7 +603,12 @@ ...@@ -584,7 +603,12 @@
<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> <tr>
<td>pause</td>
<td>3000</td>
<td></td>
</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>
<td></td> <td></td>
...@@ -599,6 +623,68 @@ ...@@ -599,6 +623,68 @@
<td>//button[@type="submit" and @class="success"]</td> <td>//button[@type="submit" and @class="success"]</td>
<td></td> <td></td>
</tr> </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> <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>
...@@ -1589,9 +1712,60 @@ if end &lt; in_data_stream.getSize(): ...@@ -1589,9 +1712,60 @@ 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>
<td>openAndWait</td>
<td>${base_url}/Zuite_callHandleAnalysisAlarm</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Alarm Called.</td>
<td></td>
</tr>
<tr> <tr>
<td>pause</td> <td>openAndWait</td>
<td>350000</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>
......
...@@ -8,20 +8,112 @@ ...@@ -8,20 +8,112 @@
<td>base_url_x</td> <td>base_url_x</td>
</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></td> <td>Done.</td>
</tr> <td></td>
<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> <tr>
</tr> <td>openAndWait</td>
<tr class="" style="opacity: 1;"> <td>${base_url}/Zuite_waitForActivities</td>
<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></td>
</tr> </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>
<tr>
<td>openAndWait</td>
<td>${base_url}/Zuite_updateUserPreferenceForTutorialTests</td>
<td></td>
</tr>
</tbody> </tbody>
</table> </table>
</test> </test>
...@@ -235,6 +327,17 @@ ...@@ -235,6 +327,17 @@
<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>
...@@ -336,23 +439,23 @@ ...@@ -336,23 +439,23 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@data-i18n="Preference: Preference for functional_test_username"]</td> <td>//a[@data-i18n="Preference: Preference for functional_test_tutorial_username"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[@data-i18n="Preference: Preference for functional_test_username"]</td> <td>//a[@data-i18n="Preference: Preference for functional_test_tutorial_username"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[contains(@href,'default_sytem_preference')]</td> <td>//a[contains(@href,'default_system_preference')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(@href,'default_sytem_preference')]</td> <td>//a[contains(@href,'default_system_preference')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -926,12 +1029,12 @@ ...@@ -926,12 +1029,12 @@
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@type="submit" and @value="Create Document"]</td> <td>//input[@type="submit" and @value="Validate"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//input[@type="submit" and @value="Create Document"]</td> <td>//input[@type="submit" and @value="Validate"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -939,6 +1042,18 @@ ...@@ -939,6 +1042,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>
...@@ -1167,6 +1282,14 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -1167,6 +1282,14 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
<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>
...@@ -1198,26 +1321,160 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -1198,26 +1321,160 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
<td></td> <td></td>
</tr> </tr>
<tr>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@id="field_my_id"]</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_id"]</td> <td>//input[@id="field_my_title"]</td>
<td>DataAnalysisLine_resampleRawArrayAll</td> <td>DataAnalysisLine_resampleRawArrayAll</td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_reference"]</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@id="field_my_title"]</td> <td>//input[@id="field_my_reference"]</td>
<td>DataAnalysisLine_resampleRawArrayAll</td> <td>DataAnalysisLine_resampleRawArrayAll</td>
</tr> </tr>
<tr>
<td>pause</td>
<td>3000</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>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_resampleRawArrayAll']</td>
<td></td>
</tr>
<td>click</td>
<td>//a[text()='DataAnalysisLine_resampleRawArrayAll']</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_resampleRawArrayAll"]</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>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@id="field_my_reference"]</td> <td>//input[@id="field_my_id"]</td>
<td>DataAnalysisLine_resampleRawArrayAll</td> <td>DataAnalysisLine_resampleRawArrayAll</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>
<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>waitForElementPresent</td>
<td>//button[@type="submit" and @class="success"]</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@id="field_my_parameter_signature"]</td> <td>//input[@id="field_my_parameter_signature"]</td>
...@@ -1225,7 +1482,7 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -1225,7 +1482,7 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
</tr> </tr>
<tr> <tr>
<td>pause</td> <td>pause</td>
<td>15000</td> <td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -1247,149 +1504,151 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -1247,149 +1504,151 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
<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> <td>
import numpy as np <pre>
import pandas as pd import numpy as np<br />
import pandas as pd<br />
out_array_list = out_array <br />
out_array_list = out_array<br />
in_data_array = in_array[&quot;Data Array&quot;] <br />
progress_indicator = in_array[&quot;Progress Indicator&quot;] in_data_array = in_array[&quot;Data Array&quot;]<br />
progress_indicator = in_array[&quot;Progress Indicator&quot;]<br />
in_zbigarray = in_data_array.getArray() <br />
if in_zbigarray is None: in_zbigarray = in_data_array.getArray()<br />
&nbsp; return if in_zbigarray is None:<br />
&nbsp;&nbsp;return<br />
if in_zbigarray.shape[0] == 0: <br />
&nbsp; return if in_zbigarray.shape[0] == 0:<br />
&nbsp;&nbsp;return<br />
# first fill array with lowest resolution <br />
default_data_array = out_array_list[0][&quot;Data Array&quot;] # first fill array with lowest resolution<br />
default_resolution = out_array_list[0][&quot;resolution&quot;] default_data_array = out_array_list[0][&quot;Data Array&quot;]<br />
default_frequency = pd.to_timedelta(default_resolution) default_resolution = out_array_list[0][&quot;resolution&quot;]<br />
default_zbigarray = default_data_array.getArray() default_frequency = pd.to_timedelta(default_resolution)<br />
default_zbigarray = default_data_array.getArray()<br />
index = progress_indicator.getIntOffsetIndex() <br />
index = progress_indicator.getIntOffsetIndex()<br />
# convert data to DataFrame <br />
df = pd.DataFrame.from_records(in_zbigarray[index:].copy(), index=&#39;date&#39;) # convert data to DataFrame<br />
df = pd.DataFrame.from_records(in_zbigarray[index:].copy(), index=&#039;date&#039;)<br />
# ignore data before start date of output array <br />
if default_zbigarray is not None: # ignore data before start date of output array<br />
&nbsp; if default_zbigarray.shape[0] != 0: if default_zbigarray is not None:<br />
&nbsp; &nbsp; df = df.loc[str(default_zbigarray[0][&#39;date&#39;]):] &nbsp;&nbsp;if default_zbigarray.shape[0] != 0:<br />
&nbsp;&nbsp; &nbsp;df = df.loc[str(default_zbigarray[0][&#039;date&#039;]):]<br />
if len(df) == 0: <br />
&nbsp; return if len(df) == 0:<br />
&nbsp;&nbsp;return<br />
# resample <br />
df = df.resample(default_resolution).agg([&#39;min&#39;,&#39;mean&#39;,&#39;max&#39;]).fillna(0) # resample<br />
df = df.resample(default_resolution).agg([&#039;min&#039;,&#039;mean&#039;,&#039;max&#039;]).fillna(0)<br />
# rename columns from tuples like (&#39;x&#39;, &#39;min&#39;) to names like &#39;x_min&#39; <br />
df.columns = [&#39;%s%s&#39; % (a, &#39;_%s&#39; % b if b else &#39;&#39;) for a, b in df.columns] # rename columns from tuples like (&#039;x&#039;, &#039;min&#039;) to names like &#039;x_min&#039;<br />
df.columns = [&#039;%s%s&#039; % (a, &#039;_%s&#039; % b if b else &#039;&#039;) for a, b in df.columns]<br />
context.log(&quot;df.columns = &quot;, df.columns) <br />
context.log(&quot;df.columns = &quot;, df.columns)<br />
# save date vector for later <br />
date_vector = df.index.values.copy() # save date vector for later<br />
date_vector = df.index.values.copy()<br />
context.log(&quot;date_vector = &quot;, date_vector) <br />
context.log(&quot;date_vector = &quot;, date_vector)<br />
# convert data back to ndarray <br />
default_data = df.to_records(convert_datetime64=False) # convert data back to ndarray<br />
# view as structured array default_data = df.to_records(convert_datetime64=False)<br />
# view as structured array<br />
# set date to zero where all values are 0 <br />
mask_zero = (df==0).all(axis=1) # set date to zero where all values are 0<br />
default_data[&#39;date&#39;][mask_zero] = 0 mask_zero = (df==0).all(axis=1)<br />
default_data[&#039;date&#039;][mask_zero] = 0<br />
if default_zbigarray is None: <br />
&nbsp; default_zbigarray = default_data_array.initArray(shape=(0,), dtype=default_data.dtype.fields) if default_zbigarray is None:<br />
&nbsp;&nbsp;default_zbigarray = default_data_array.initArray(shape=(0,), dtype=default_data.dtype.fields)<br />
if default_zbigarray.shape[0] == 0: <br />
&nbsp; default_zbigarray.append(default_data) if default_zbigarray.shape[0] == 0:<br />
&nbsp;&nbsp;default_zbigarray.append(default_data)<br />
else: <br />
# calculate start and stop index of new data in output array else:<br />
&nbsp; default_start_index = int((date_vector[0] - default_zbigarray[0][&#39;date&#39;]) / default_frequency) &nbsp;&nbsp;# calculate start and stop index of new data in output array<br />
&nbsp; default_stop_index = int((date_vector[-1] - default_zbigarray[0][&#39;date&#39;]) / default_frequency + 1) &nbsp;&nbsp;default_start_index = int((date_vector[0] - default_zbigarray[0][&#039;date&#039;]) / default_frequency)<br />
&nbsp;&nbsp;default_stop_index = int((date_vector[-1] - default_zbigarray[0][&#039;date&#039;]) / default_frequency + 1)<br />
# make sure data fits in <br />
&nbsp; if default_stop_index &gt; default_zbigarray.shape[0]: &nbsp;&nbsp;# make sure data fits in<br />
&nbsp; &nbsp; default_zbigarray.resize((default_stop_index,)) &nbsp;&nbsp;if default_stop_index &gt; default_zbigarray.shape[0]:<br />
&nbsp;&nbsp; &nbsp;default_zbigarray.resize((default_stop_index,))<br />
# fill holes in new data with values from old data <br />
&nbsp; old_data = default_zbigarray[default_start_index:default_stop_index] &nbsp;&nbsp;# fill holes in new data with values from old data<br />
&nbsp; default_data[mask_zero ] = old_data[mask_zero] &nbsp;&nbsp;old_data = default_zbigarray[default_start_index:default_stop_index]<br />
&nbsp;&nbsp;default_data[mask_zero ] = old_data[mask_zero]<br />
# write new_data to zbigarray <br />
&nbsp; default_zbigarray[default_start_index:default_stop_index] = default_data &nbsp;&nbsp;# write new_data to zbigarray<br />
&nbsp;&nbsp;default_zbigarray[default_start_index:default_stop_index] = default_data<br />
<br />
# now use data in first resolution array for all other arrays <br />
for out_array in out_array_list[1:]: # now use data in first resolution array for all other arrays<br />
&nbsp; out_data_array = out_array[&quot;Data Array&quot;] for out_array in out_array_list[1:]:<br />
&nbsp; out_array_resolution = out_array[&quot;resolution&quot;] &nbsp;&nbsp;out_data_array = out_array[&quot;Data Array&quot;]<br />
&nbsp; out_zbigarray = out_data_array.getArray() &nbsp;&nbsp;out_array_resolution = out_array[&quot;resolution&quot;]<br />
&nbsp; if out_zbigarray is None: &nbsp;&nbsp;out_zbigarray = out_data_array.getArray()<br />
&nbsp; &nbsp; out_zbigarray = out_data_array.initArray(shape=(0,), dtype=default_data.dtype.fields) &nbsp;&nbsp;if out_zbigarray is None:<br />
&nbsp;&nbsp; &nbsp;out_zbigarray = out_data_array.initArray(shape=(0,), dtype=default_data.dtype.fields)<br />
&nbsp; if out_zbigarray.shape[0] == 0: <br />
&nbsp; &nbsp; start_index = 0 &nbsp;&nbsp;if out_zbigarray.shape[0] == 0:<br />
&nbsp; else: &nbsp;&nbsp; &nbsp;start_index = 0<br />
&nbsp; &nbsp; out_array_frequency = pd.to_timedelta(out_array_resolution) &nbsp;&nbsp;else:<br />
&nbsp;&nbsp; &nbsp;out_array_frequency = pd.to_timedelta(out_array_resolution)<br />
&nbsp; &nbsp; new_stop_date = default_zbigarray[0][&#39;date&#39;] + default_zbigarray.shape[0] * default_frequency <br />
&nbsp; &nbsp; old_stop_date = out_zbigarray[0][&#39;date&#39;] + out_zbigarray.shape[0] * out_array_frequency &nbsp;&nbsp; &nbsp;new_stop_date = default_zbigarray[0][&#039;date&#039;] + default_zbigarray.shape[0] * default_frequency<br />
&nbsp;&nbsp; &nbsp;old_stop_date = out_zbigarray[0][&#039;date&#039;] + out_zbigarray.shape[0] * out_array_frequency<br />
&nbsp; &nbsp; start_date = old_stop_date - out_array_frequency <br />
&nbsp; &nbsp; if old_stop_date &gt;= new_stop_date: &nbsp;&nbsp; &nbsp;start_date = old_stop_date - out_array_frequency<br />
&nbsp; &nbsp; &nbsp; continue &nbsp;&nbsp; &nbsp;if old_stop_date &gt;= new_stop_date:<br />
&nbsp;&nbsp; &nbsp; &nbsp;continue<br />
# find row index in in_array from where to start resampling <br />
&nbsp; &nbsp; start_index = int(max((start_date - default_zbigarray[0][&#39;date&#39;]) / default_frequency, 0)) &nbsp;&nbsp; &nbsp;# find row index in in_array from where to start resampling<br />
# if we got data which has been already resampled, then we resample again and overwrite &nbsp;&nbsp; &nbsp;start_index = int(max((start_date - default_zbigarray[0][&#039;date&#039;]) / default_frequency, 0))<br />
&nbsp; &nbsp; start_index = min(start_index, default_start_index) &nbsp;&nbsp; &nbsp;# if we got data which has been already resampled, then we resample again and overwrite<br />
&nbsp;&nbsp; &nbsp;start_index = min(start_index, default_start_index)<br />
&nbsp; data = default_zbigarray[start_index:].copy() <br />
&nbsp;&nbsp;data = default_zbigarray[start_index:].copy()<br />
# convert data to DataFrame and resample <br />
&nbsp; df = pd.DataFrame.from_records(data, index=&#39;date&#39;) &nbsp;&nbsp;# convert data to DataFrame and resample<br />
&nbsp;&nbsp;df = pd.DataFrame.from_records(data, index=&#039;date&#039;)<br />
# set our own date range index so that we can resample and keep 0-dates <br />
&nbsp; resampling_start_date = default_zbigarray[0][&#39;date&#39;] + start_index * default_frequency &nbsp;&nbsp;# set our own date range index so that we can resample and keep 0-dates<br />
&nbsp; df.index = pd.date_range(start=resampling_start_date, &nbsp;&nbsp;resampling_start_date = default_zbigarray[0][&#039;date&#039;] + start_index * default_frequency<br />
periods=data.shape[0], &nbsp;&nbsp;df.index = pd.date_range(start=resampling_start_date,<br />
freq=default_frequency) &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; periods=data.shape[0],<br />
&nbsp; df.index.name = &#39;date&#39; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; freq=default_frequency)<br />
&nbsp;&nbsp;df.index.name = &#039;date&#039;<br />
# resample each column with appropriate aggregation method <br />
&nbsp; aggregation_dict = {c: c.split(&#39;_&#39;)[-1] for c in df.columns} &nbsp;&nbsp;# resample each column with appropriate aggregation method<br />
&nbsp; df = df.resample(out_array_resolution).agg(aggregation_dict).fillna(0) &nbsp;&nbsp;aggregation_dict = {c: c.split(&#039;_&#039;)[-1] for c in df.columns}<br />
&nbsp;&nbsp;df = df.resample(out_array_resolution).agg(aggregation_dict).fillna(0)<br />
# save date vector for later <br />
&nbsp; date_vector = df.index.values.copy() &nbsp;&nbsp;# save date vector for later<br />
&nbsp;&nbsp;date_vector = df.index.values.copy()<br />
# convert data back to ndarray <br />
&nbsp; new_data = df.to_records(convert_datetime64=False) &nbsp;&nbsp;# convert data back to ndarray<br />
&nbsp;&nbsp;new_data = df.to_records(convert_datetime64=False)<br />
# set date to zero where all values are 0 <br />
&nbsp; new_data[&#39;date&#39;][(df==0).all(axis=1)] = 0 &nbsp;&nbsp;# set date to zero where all values are 0<br />
&nbsp;&nbsp;new_data[&#039;date&#039;][(df==0).all(axis=1)] = 0<br />
&nbsp; if out_zbigarray.shape[0] == 0: <br />
&nbsp; &nbsp; out_zbigarray.append(new_data) &nbsp;&nbsp;if out_zbigarray.shape[0] == 0:<br />
&nbsp; else: &nbsp;&nbsp; &nbsp;out_zbigarray.append(new_data)<br />
# calculate start and stop index of new data in output array &nbsp;&nbsp;else:<br />
&nbsp; &nbsp; start_index = int((date_vector[0] - out_zbigarray[0][&#39;date&#39;]) / out_array_frequency) &nbsp;&nbsp; &nbsp;# calculate start and stop index of new data in output array<br />
&nbsp; &nbsp; stop_index = int((date_vector[-1] - out_zbigarray[0][&#39;date&#39;]) / out_array_frequency + 1) &nbsp;&nbsp; &nbsp;start_index = int((date_vector[0] - out_zbigarray[0][&#039;date&#039;]) / out_array_frequency)<br />
&nbsp;&nbsp; &nbsp;stop_index = int((date_vector[-1] - out_zbigarray[0][&#039;date&#039;]) / out_array_frequency + 1)<br />
# make sure data fits in <br />
&nbsp; &nbsp; if stop_index &gt; out_zbigarray.shape[0]: &nbsp;&nbsp; &nbsp;# make sure data fits in<br />
&nbsp; &nbsp; &nbsp; out_zbigarray.resize((stop_index,)) &nbsp;&nbsp; &nbsp;if stop_index &gt; out_zbigarray.shape[0]:<br />
&nbsp;&nbsp; &nbsp; &nbsp;out_zbigarray.resize((stop_index,))<br />
# write new_data to zbigarray <br />
&nbsp; &nbsp; out_zbigarray[start_index:stop_index] = new_data &nbsp;&nbsp; &nbsp;# write new_data to zbigarray<br />
&nbsp;&nbsp; &nbsp;out_zbigarray[start_index:stop_index] = new_data<br />
<br />
progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -2653,12 +2912,12 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -2653,12 +2912,12 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@type="submit" and @value="Create Document"]</td> <td>//input[@type="submit" and @value="Validate"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//input[@type="submit" and @value="Create Document"]</td> <td>//input[@type="submit" and @value="Validate"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -2666,6 +2925,17 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -2666,6 +2925,17 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
<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>
...@@ -2704,29 +2974,80 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -2704,29 +2974,80 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
<td>//a[contains(@href,'page=front')]</td> <td>//a[contains(@href,'page=front')]</td>
<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>
<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> <td></td>
</tr> </tr>
<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>waitForElementPresent</td>
<td>//a[contains(@href,'data_analysis_module')]</td> <td>//a[@accesskey="m"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(@href,'data_analysis_module')]</td> <td>//a[@accesskey="m"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>pause</td> <td>pause</td>
<td>3000</td> <td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@class='document_table']//table//tbody//tr//td[1]</td> <td>//a[contains(@href,'data_analysis_module')]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(@href,'data_analysis_module')]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -2778,23 +3099,43 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -2778,23 +3099,43 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
<table style="display: none;" class="test"> <table style="display: none;" class="test">
<tbody> <tbody>
<tr> <tr>
<td>pause</td> <td>openAndWait</td>
<td>3000</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> <td></td>
</tr> </tr>
<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>waitForElementPresent</td>
<td>//a[contains(@href,'page=front')]</td> <td>//a[@accesskey="m"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(@href,'page=front')]</td> <td>//a[@accesskey="m"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>pause</td> <td>pause</td>
<td>350000</td> <td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -2812,11 +3153,6 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0]) ...@@ -2812,11 +3153,6 @@ progress_indicator.setIntOffsetIndex(in_zbigarray.shape[0])
<td>3000</td> <td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='document_table']//table//tbody//tr//td[1]</td>
<td></td>
</tr>
<tr> <tr>
<td>assertTextPresent</td> <td>assertTextPresent</td>
<td>Resample Generic Interval Array</td> <td>Resample Generic Interval Array</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_username</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>content_md5</string> </key> <key> <string>content_md5</string> </key>
<value> <value>
......
...@@ -2,29 +2,123 @@ ...@@ -2,29 +2,123 @@
<test> <test>
<table style="display: none;" class="test"> <table style="display: none;" class="test">
<tbody> <tbody>
<tr> <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>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>
<td>base_url_x</td> <td>base_url_x</td>
</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></td> <td>Done.</td>
</tr> <td></td>
<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> <tr>
</tr> <td>openAndWait</td>
<tr class="" style="opacity: 1;"> <td>${base_url}/Zuite_waitForActivities</td>
<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></td>
</tr> </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>
<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>
......
...@@ -2,29 +2,123 @@ ...@@ -2,29 +2,123 @@
<test> <test>
<table style="display: none;" class="test"> <table style="display: none;" class="test">
<tbody> <tbody>
<tr> <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>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>
<td>base_url_x</td> <td>base_url_x</td>
</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></td> <td>Done.</td>
</tr> <td></td>
<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> <tr>
</tr> <td>openAndWait</td>
<tr class="" style="opacity: 1;"> <td>${base_url}/Zuite_waitForActivities</td>
<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></td>
</tr> </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>
<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>
...@@ -240,6 +334,17 @@ ...@@ -240,6 +334,17 @@
<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>
...@@ -289,6 +394,16 @@ ...@@ -289,6 +394,16 @@
<test> <test>
<table style="display: none;" class="test"> <table style="display: none;" class="test">
<tbody> <tbody>
<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> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[@accesskey='m']</td> <td>//a[@accesskey='m']</td>
...@@ -405,6 +520,17 @@ ...@@ -405,6 +520,17 @@
<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>
...@@ -546,6 +672,11 @@ else: ...@@ -546,6 +672,11 @@ else:
<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>
...@@ -577,26 +708,160 @@ else: ...@@ -577,26 +708,160 @@ else:
<td></td> <td></td>
</tr> </tr>
<tr>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@id="field_my_id"]</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_id"]</td> <td>//input[@id="field_my_title"]</td>
<td>DataAnalysisLine_predictPressureFromHumidity</td> <td>DataAnalysisLine_predictPressureFromHumidity</td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_reference"]</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@id="field_my_title"]</td> <td>//input[@id="field_my_reference"]</td>
<td>DataAnalysisLine_predictPressureFromHumidity</td> <td>DataAnalysisLine_predictPressureFromHumidity</td>
</tr> </tr>
<tr>
<td>pause</td>
<td>3000</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>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_predictPressureFromHumidity']</td>
<td></td>
</tr>
<td>click</td>
<td>//a[text()='DataAnalysisLine_predictPressureFromHumidity']</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_predictPressureFromHumidity"]</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>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@id="field_my_reference"]</td> <td>//input[@id="field_my_id"]</td>
<td>DataAnalysisLine_predictPressureFromHumidity</td> <td>DataAnalysisLine_predictPressureFromHumidity</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>
<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>waitForElementPresent</td>
<td>//button[@type="submit" and @class="success"]</td>
<td></td>
</tr>
<tr> <tr>
<td>type</td> <td>type</td>
<td>//input[@id="field_my_parameter_signature"]</td> <td>//input[@id="field_my_parameter_signature"]</td>
...@@ -625,7 +890,9 @@ else: ...@@ -625,7 +890,9 @@ else:
<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>import numpy as np <td>
<pre>
import numpy as np
import pandas as pd import pandas as pd
from sklearn.model_selection import train_test_split from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression from sklearn.linear_model import LinearRegression
...@@ -676,6 +943,7 @@ else: ...@@ -676,6 +943,7 @@ else:
&nbsp; array_len = &nbsp;len(ndarray) &nbsp; array_len = &nbsp;len(ndarray)
&nbsp; if start_index &lt; array_len: &nbsp; if start_index &lt; array_len:
&nbsp; &nbsp; zbigarray.append(ndarray[start_index:]) &nbsp; &nbsp; zbigarray.append(ndarray[start_index:])
</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -1558,6 +1826,17 @@ else: ...@@ -1558,6 +1826,17 @@ else:
<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>
...@@ -1582,23 +1861,63 @@ else: ...@@ -1582,23 +1861,63 @@ else:
<table style="display: none;" class="test"> <table style="display: none;" class="test">
<tbody> <tbody>
<tr> <tr>
<td>pause</td> <td>openAndWait</td>
<td>3000</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}/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> <td></td>
</tr> </tr>
<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>waitForElementPresent</td>
<td>//a[contains(@href,'page=front')]</td> <td>//a[@accesskey="m"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(@href,'page=front')]</td> <td>//a[@accesskey="m"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>pause</td> <td>pause</td>
<td>350000</td> <td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
...@@ -1616,11 +1935,6 @@ else: ...@@ -1616,11 +1935,6 @@ else:
<td>3000</td> <td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@class='document_table']//table//tbody//tr//td[1]</td>
<td></td>
</tr>
<tr> <tr>
<td>assertTextPresent</td> <td>assertTextPresent</td>
<td>Predict Pressure</td> <td>Predict Pressure</td>
...@@ -1670,75 +1984,70 @@ else: ...@@ -1670,75 +1984,70 @@ else:
<table style="display: none;" class="test"> <table style="display: none;" class="test">
<tbody> <tbody>
<tr> <tr>
<td>pause</td> <td>openAndWait</td>
<td>3000</td> <td>${base_url}/Zuite_callHandleAnalysisAlarm</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//a[contains(@href,'page=front')]</td> <td>Alarm Called.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>openAndWait</td>
<td>//a[contains(@href,'page=front')]</td> <td>${base_url}/Zuite_waitForActivities</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>pause</td> <td>assertTextPresent</td>
<td>350000</td> <td>Done.</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>openAndWait</td>
<td>${base_url_x}/web_site_module/default_wendelin_front/</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//a[contains(@href,'data_array_module')]</td> <td>//a[@accesskey="m"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>click</td>
<td>//a[contains(@href,'data_array_module')]</td> <td>//a[@accesskey="m"]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>pause</td> <td>pause</td>
<td>3000</td> <td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//div[@class='document_table']//table//tbody//tr//td[1]</td> <td>//a[contains(@href,'data_array_module')]</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Predict Pressure</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>assertTextNotPresent</td>
<td>None</td>
<td></td>
</tr>
<!--<tr>
<td>click</td> <td>click</td>
<td>//div[@class='document_table']//table//tbody//tr//td[2]</td> <td>//a[contains(@href,'data_array_module')]</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>pause</td> <td>pause</td>
<td>200000</td> <td>3000</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>assertTextPresent</td>
<td>//a[contains(@href,'preview')]</td> <td>Predict Pressure</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>click</td> <td>assertTextNotPresent</td>
<td>//a[contains(@href,'preview')]</td> <td>None</td>
<td></td> <td></td>
</tr>--> </tr>
</tbody> </tbody>
</table> </table>
</test> </test>
...@@ -2011,6 +2320,31 @@ function getPredictionData(start_date, stop_date){ ...@@ -2011,6 +2320,31 @@ function getPredictionData(start_date, stop_date){
<test> <test>
<table style="display: none;" class="test"> <table style="display: none;" class="test">
<tbody> <tbody>
<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>
...@@ -2023,13 +2357,14 @@ function getPredictionData(start_date, stop_date){ ...@@ -2023,13 +2357,14 @@ function getPredictionData(start_date, stop_date){
</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> <td>
<pre>
%% md %% md
# Prediction # Prediction
&lt;div class=&quot;prediction_plot_div&quot; id=&quot;prediction_plot_div&quot;/&gt; &lt;div class=&quot;prediction_plot_div&quot; id=&quot;prediction_plot_div&quot;/&gt;
...@@ -2153,6 +2488,7 @@ function getPredictionData(start_date, stop_date){ ...@@ -2153,6 +2488,7 @@ function getPredictionData(start_date, stop_date){
&nbsp; &nbsp; &nbsp; return data &nbsp; &nbsp; &nbsp; return data
&nbsp; &nbsp; }); &nbsp; &nbsp; });
} }
</pre>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -2177,7 +2513,7 @@ function getPredictionData(start_date, stop_date){ ...@@ -2177,7 +2513,7 @@ function getPredictionData(start_date, stop_date){
</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>
......
<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>
</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> <td></td>
</tr> </tr>
<tr> <tr>
<td>waitForElementPresent</td> <td>waitForElementPresent</td>
<td>//input[@name="your_first_name"]</td> <td>//input[@name="your_first_name"]</td>
...@@ -133,47 +136,50 @@ ...@@ -133,47 +136,50 @@
<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>
<td>//input[@name="__ac_password"]</td> <td>//input[@name="__ac_password"]</td>
<td>secret</td> <td>secret</td>
</tr> </tr>
<tr> <tr>
<td>clickAndWait</td> <td>clickAndWait</td>
<td>//input[@name="logged_in:method"]</td> <td>//input[@name="logged_in:method"]</td>
<td></td> <td></td>
</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>
<td>assertTextPresent</td>
<td>functional_test_tutorial_username</td>
<td></td>
</tr>
<tr>
<td>pause</td> <tr>
<td>20000</td>
<td></td>
</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