Commit bde341c9 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Refactor tests to use only erp5 user instead of zope user

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45270 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3640454b
master allow_login_change allow_login_change_wip arnau arnau-TM-FEC-output arnau-TM-getTypeBasedMethod-for-init_script arnau-TM-isBuildable-with-multiple-BusinessLinks arnau-TM-jabber-client-desktop-notifications arnau-kns arnau-kns-without-property-mapping arnau-merge arnau-poc arnau-real-time-inventory-accounting auto_extend_select_list autoflake backup_erp5_workflow bk_erp5ish_actions_tool bk_sqlcatalog boc-interaction-drop bryton/py3 bt5_config cache callable-jupyter-storage catalog_filter catalog_fulltext catalog_fulltext_old cedric cedriclen cedriclen-eos certificate_authority cherry-pick-243c2f03 cherry-pick-304d7a28 cherry-pick-4a8e045d cleanJSByJSLint clean_up_upgrader cleanup_acquisition_base_category compact_title_no_reference credential_update_action datetimefield deferred_listbox delivery_item_barcode douglas_forum dream_distributor dsn-phase3 eos-dev erp5-component erp5-forum erp5-imt erp5-messenger erp5-preference erp5-release erp5-slapos-upgrade erp5-util-testing erp5-vifib erp5-vifib-cleanup erp5_calendar erp5_catalog erp5_catalog_final erp5_corporate_identity erp5_free_subscription erp5_hal_json_style_fix_restricted_access_with_traverse erp5_payslip_migration erp5_workflow erp5testnode_max_timeout experiment/coding_style_test_suite feat/olapy feat/pdm_content_translation feature/accounting-reports-stats feature/hal-actions-support feature/hal-support-update feature/jio-accounting-reports feature/jio-action-accounting feature/jio-selection-actions feature/json-allows-all-jio-actions feature/renderjs-matrixbox feature/renderjs-ui-no-header feature/rjs-listbox-stats feature/rjs-mass-transition feature/rjs-print-action fix/consistency_check_alarm fix/login_validate_check_consistency fix/multiple_small_fixes_to_zodb_history_tab fix/support-request-app-empty fix_system_processes_ownership for_testrunner_1 for_testrunner_2 for_testrunner_3 gabriel gabriel-fix-rounding-in-accounting-generation gabriel-fix-rounding-in-accounting-generation2 gadget-json-value hotfix/accounting-test-timeout hotfix/callable_tool hotfix/field-keeps-request hotfix/jio-mass-transition hotfix/jio_view hotfix/pdm-test hotfix/rjs-accounting-tests hotfix/rjs-editability hotfix/rjs-form-less-invasive hotfix/rjs-formfields-padding hotfix/rjs-listbox-mutex hotfix/rjs-replace-query-with-uids hotfix/tests-cleanup http_cache_fix improve_default_caching_policy_manager initsite interaction-drop isDeletable item_tracking_graph_editor ivan jerome-bt-reference-doc jerome_graph_editor_renderjs jerome_new_style_solve_divergence jerome_user_preference_time_zone jio jm/form-action-guard joblib-activity js-ui keep_order_in_set_type_category_accessor kns lazy_simulation_causality lignan lingnan listbox-generator listbox_url macros_fix mame mame-bt5-cleanup mame-erp5_project-cleanup mame-naming-convention mame-naming-convention-list_method mame-test-stock-indexation mame-work mame2 maste_copy master-erp5-test-result-scalability master-erp5-test-result-scalability-rebase master-test-fix-additionalbt5path master_calendar_wip_patches master_calendar_wip_patches_extend_security master_no_guard_on_workflow_transition master_no_guard_on_workflow_transition_plus_calendar_wip_patchs mic_wind mmariani-inventory monitoring monitoring-graph mrp new-render-presentation no_longer_simulated_state officejs officejs_clean officejs_zip ojs_wip pere portal_callables portal_solver_process_security_configuration presentation rebased_mrp refactor/base_edit refactor/renderjs reindex_calendar_after_change_calendar_exception revert-38554dbe revert-6c89fe9b rewrite_test_21_AcquiredPortalType romain-fulltext scalability-master scalability-master2 scalability-master2-rebase scalability-roque scalability-roque-2 scalability-run-command shop-box sms_more_than_140_characters streaming_fix streaming_fix-0 strict_catalog syncml taskdistribution-xmlrpc-binary test_page testnode_software_link timezones tmp/getInstalledBusinessTemplate_never_installed_bt tristan tristan-merge tristan-performance ttrm upgradeSite valentin_translation_fix view-aggregated-amounts vivekpab_renderjs_interfaces wenjie wenjie_branch wip wsgi-gevent yryr yryr-components-cp yryr-inventory-cache yryr-test yryr-with-components yusei test-ui test-rjsacc test-rjs renderjs-test erp5.util-0.4.58 erp5.util-0.4.57 erp5.util-0.4.56 erp5.util-0.4.55 erp5.util-0.4.54 erp5.util-0.4.53 erp5.util-0.4.52 erp5.util-0.4.49 erp5.util-0.4.46 erp5.util-0.4.44 erp5.util-0.4.43 erp5.util-0.4.41 erp5.util-0.4.40 erp5.util-0.4.37 erp5.util-0.4.1 erp5.util-0.4 erp5.util-0.3 erp5.util-0.2 erp5.util-0.1
No related merge requests found
......@@ -48,22 +48,7 @@
<tr><td rowspan="1" colspan="3" tal:content="template/getId"/></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/init" />\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/create-user" />\n
<tr>\n
<td>type</td>\n
<td>__ac_name</td>\n
<td>ung_user</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>__ac_password</td>\n
<td>1234</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@type="submit"]</td>\n
<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/login" />\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>Please wait while your home area is being prepared.</td>\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title tal:content="template/getId"/>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3" tal:content="template/getId"/></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/init" />\n
<tal:block metal:use-macro="here/Zuite_CommonTemplateForUNG/macros/create-user" />\n
<tr>\n
<td>type</td>\n
<td>__ac_name</td>\n
<td>ung_user</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>__ac_password</td>\n
<td>1234</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@type="submit"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/ERP5Site_createNewWebDocument?template=web_page_template</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//a[@name="document_title"]</td>\n
<td>Web Page</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//a[@class="ung_docs"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@class="listbox-check-all"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@class="delete"]</td>\n
<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities"/>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tbody/tr[@class="your_listbox-data-line-0 DataA"]/td[3]/a</td>\n
<td>Web Page</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tbody/tr[@class="your_listbox-data-line-0 DataA"]/td[4]/a</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@class="listbox-check-all"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@class="delete"]</td>\n
<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities"/>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//table[@class="your_listbox-table-domain-tree"]/tbody/tr[11]/td/a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//input[@class="listbox-check-all"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@class="delete"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//td[@class="listbox-table-no-result-row"]/span</td>\n
<td>No result.</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/ERP5Site_createNewWebDocument?template=web_table_template</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//a[@name="document_title"]</td>\n
<td>Web Table</td>\n
</tr>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities"/>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//table[@class="your_listbox-table-domain-tree"]/tbody/tr[3]/td[2]/a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//td[@class="listbox-table-no-result-row"]/span</td>\n
<td>No result.</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//table[@class="your_listbox-table-domain-tree"]/tbody/tr[4]/td[2]/a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tbody/tr[@class="your_listbox-data-line-0 DataA"]/td[3]/a</td>\n
<td>Web Table</td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//tbody/tr[@class="your_listbox-data-line-0 DataA"]/td[4]/a</td>\n
<td>Draft</td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//td[@class="listbox-table-select-cell"]/input</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@class="delete"]</td>\n
<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities"/>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//table[@class="your_listbox-table-domain-tree"]/tbody/tr[11]/td/a</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyTextNotPresent</td>\n
<td>No result.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>click</td>\n
<td>//td[@class="listbox-table-select-cell"]/input</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@class="delete"]</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyText</td>\n
<td>//td[@class="listbox-table-no-result-row"]/span</td>\n
<td>No result.</td>\n
</tr>\n
</tbody>\n
</table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testUNGDocsWithERP5User</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -76,7 +76,7 @@
</tr>\n
<tr>\n
<td>verifyTextPresent</td>\n
<td>zope</td>\n
<td>test_user</td>\n
<td></td>\n
</tr>\n
<tr>\n
......
<?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>_body</string> </key>
<value> <string>portal = context.getPortalObject()\n
\n
user = portal.portal_catalog.getResultValue(portal_type="Person", reference="test_user")\n
\n
if not user:\n
person = portal.person_module.newContent(portal_type="Person")\n
person.edit(first_name="UNG User",\n
password="test_user",\n
reference="test_user")\n
\n
assignment = person.newContent(portal_type=\'Assignment\')\n
assignment.setFunction("function/ung_user")\n
assignment.open()\n
\n
return True\n
</string> </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>ERP5Site_createUNGUser</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -45,11 +45,17 @@
<td>${base_url}/web_site_module/ung</td>\n
<td>ung_url</td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/ERP5Site_createUNGUser</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>openAndWait</td>\n
<td>${base_url}/ERP5Site_cleanUpUNGTestEnvironment</td>\n
<td></td>\n
</tr>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/wait_for_activities"/>\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/WebSite_logout</td>\n
......@@ -58,25 +64,25 @@
</tal:block>\n
<tal:block metal:define-macro="login">\n
<tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/WebSite_logout</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>__ac_name</td>\n
<td>zope</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>__ac_password</td>\n
<td>zope</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@type="submit"]</td>\n
<td></td>\n
</tr>\n
<td>openAndWait</td>\n
<td>${ung_url}/WebSite_logout</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>__ac_name</td>\n
<td>test_user</td>\n
</tr>\n
<tr>\n
<td>type</td>\n
<td>__ac_password</td>\n
<td>test_user</td>\n
</tr>\n
<tr>\n
<td>clickAndWait</td>\n
<td>//input[@type="submit"]</td>\n
<td></td>\n
</tr>\n
</tal:block>\n
<tal:block metal:define-macro="create-user">\n
<tr>\n
......
42
\ No newline at end of file
43
\ 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