Commit a91bcbf1 authored by Eteri's avatar Eteri

erp5_wendelin_tutorial_ui_test: fix tests

parent f3e32441
......@@ -114,6 +114,7 @@ if modify and data_ingestion is None:
data_ingestion_reference,
data_ingestion_id)
# find ingestion line for current resource
for line in data_ingestion.objectValues(portal_type="Data Ingestion Line"):
if line.getResourceReference() == resource_reference:
......
......@@ -5,6 +5,9 @@ request = portal.REQUEST
index = reference.index('-')
stream_reference = reference
ingestion_reference = reference[:index] + '.' + reference[index+1:len(reference)]
context.log("stream_reference = ", stream_reference)
context.log("ingestion_reference = ", ingestion_reference)
context.log("index = ", index)
request.environ['REQUEST_METHOD'] = 'POST'
request.set('reference', ingestion_reference)
......
......@@ -2,9 +2,6 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment"&gt;init&lt;/span&gt;</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
......@@ -166,17 +163,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -243,12 +235,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
......
......@@ -2,9 +2,6 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment"&gt;init&lt;/span&gt;</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
......@@ -146,11 +143,6 @@
<td>//a[contains(@href,'page=front')]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href,'data_acquisition_unit_module')]</td>
......@@ -173,17 +165,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>3000</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -230,12 +217,17 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</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="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
......
......@@ -2,9 +2,6 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment"&gt;init&lt;/span&gt;</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
......@@ -136,7 +133,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -146,7 +143,7 @@
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
</tbody>
......@@ -328,12 +325,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
......@@ -358,12 +355,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//li[contains(@data-relative-url,'organisation_module/')]</td>
<td>//li[@name='Organisation']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//li[contains(@data-relative-url,'organisation_module/')]</td>
<td>//li[@name='Organisation']</td>
<td></td>
</tr>
<tr>
......@@ -501,17 +498,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@name="submit"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@name="submit"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -590,9 +582,9 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
<td>pause</td>
<td>5000</td>
<td></td>
</tr>
</tbody>
</table>
......@@ -681,17 +673,17 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@name="submit"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@name="submit"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -740,10 +732,10 @@
<td></td>
</tr>
<tr>
<td>pause</td>
<td>5000</td>
<td></td>
</tr>
<td>pause</td>
<td>5000</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @class="success"]</td>
......@@ -769,12 +761,26 @@
<td>//input[@value="out_stream"]</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>open</td>
<td>${base_url_x}/portal_skins/erp5_wendelin_data_lake/Ingestion_ingestDataStream?reference=sensor_1-sample-environment-raw-data</td>
<td></td>
</tr>
<tr>
<td>assertTextPresent</td>
<td>Data ingested</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>60000</td>
......
......@@ -2,9 +2,6 @@
<test>
<table style="display: none;" class="test">
<tbody>
<tr>
<td colspan="3">&lt;span metal:use-macro="container/Zuite_viewTestMacroLibrary/macros/init_test_environment"&gt;init&lt;/span&gt;</td>
</tr>
<tr>
<td>store</td>
<td tal:content="python:here.getPortalObject().absolute_url()">http://example.com/erp5</td>
......@@ -86,12 +83,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//div[@data-gadget-scope="field_listbox_storage"]//div//div//div[@class='document_table']//table//tbody//tr[1]</td>
<td>//a[text()='sensor_1-sample-environment-raw-data']</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@data-gadget-scope="field_listbox_storage"]//div//div//div[@class='document_table']//table//tbody//tr[1]</td>
<td>//a[text()='sensor_1-sample-environment-raw-data']</td>
<td></td>
</tr>
<tr>
......@@ -101,17 +98,22 @@
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@data-gadget-scope="field_listbox_movement"]//div//div//div[@class='document_table']//table//tbody//tr[1]</td>
<td>//a[text()='sensor_1']</td>
<td></td>
</tr>
</tr
<tr>
<td>click</td>
<td>//div[@data-gadget-scope="field_listbox_storage"]//div//div//div[@class='document_table']//table//tbody//tr[1]//td[1]//a</td>
<td>//a[text()='sensor_1-sample-environment-raw-data']</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//input[@id="field_my_title"]</td>
<td>pause</td>
<td>5000</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Total size (bytes)</td>
<td></td>
</tr>
<tr>
......@@ -119,6 +121,11 @@
<td>Validated</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>26205759</td>
<td></td>
</tr>
</tbody>
</table>
</test>
......
......@@ -375,7 +375,7 @@ plot();</code>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -385,7 +385,7 @@ plot();</code>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......
......@@ -156,7 +156,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -166,7 +166,7 @@
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -227,12 +227,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
......@@ -291,12 +291,12 @@
<tbody>
<tr>
<td>waitForElementPresent</td>
<td>//a[contains(@href,'page=front')]</td>
<td>//a[@accesskey='m']</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//a[contains(@href,'page=front')]</td>
<td>//a[@accesskey='m']</td>
<td></td>
</tr>
<tr>
......@@ -321,7 +321,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -331,7 +331,7 @@
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -392,12 +392,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
......@@ -568,12 +568,12 @@ else:
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -791,7 +791,7 @@ else:
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -801,7 +801,7 @@ else:
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -950,7 +950,7 @@ else:
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -960,7 +960,7 @@ else:
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -1160,7 +1160,7 @@ else:
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -1170,7 +1170,7 @@ else:
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -1364,7 +1364,7 @@ else:
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -1374,7 +1374,7 @@ else:
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
......@@ -1545,12 +1545,12 @@ else:
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Validate"]</td>
<td></td>
</tr>
<tr>
......@@ -1812,7 +1812,7 @@ else:
</tr>
<tr>
<td>waitForElementPresent</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
<tr>
......@@ -1822,7 +1822,7 @@ else:
</tr>
<tr>
<td>click</td>
<td>//button[@type="submit" and @data-i18n="Proceed"]</td>
<td>//input[@type="submit" and @value="Create Document"]</td>
<td></td>
</tr>
</tbody>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Folder" module="OFS.Folder"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>100.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_wendelin_tutorial_ui_test</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
preference_tool = context.getPortalObject().portal_preferences
preference = preference_tool.getActivePreference()
if preference is not None: # XXX: 3 is Priority.USER
preference.setPreferredTextEditor('text_area')
preference.setPreferredSourceCodeEditor('text_area')
return 'Init Ok.'
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Zuite_updateUserPreferenceForTutorialTests</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -10,4 +10,5 @@ erp5_wendelin_data_lake_ingestion_default_security_model
erp5_wendelin_configurator
erp5_user_tutorial_ui_test
erp5_ui_test_core
erp5_web
\ No newline at end of file
erp5_web
erp5_notebook
\ No newline at end of file
erp5_wendelin_tutorial_ui_test
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment