Commit d75d3af5 authored by Arnaud Fontaine's avatar Arnaud Fontaine

testFunctionalConfigurator: Fix failures (#20180717-72B7B0).

* Instead of Person.reference, Person.user_id is now used to log in (fe27a9c3).
* Fields text were renamed to follow naming conventions (329c196d).
parent 920655a2
......@@ -9,8 +9,7 @@ portal = context.getPortalObject()
reference = editor
# check this is a not a reference from acl_user
if portal.acl_users.getUserById(reference) is not None or \
portal.aq_parent.acl_users.getUserById(reference) is not None:
if portal.acl_users.searchUsers(login=reference, exact_match=True):
return 0
# first check if a Business Configuration has not already "reserved" it
......
......@@ -246,7 +246,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the name of your company?</td>
<td>What is the Name of your Company?</td>
<td>
<br>
</td>
......@@ -468,7 +468,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Select the number of user accounts you want to configure</td>
<td>Select the Number of User Accounts you Want to Configure</td>
<td>
<br>
</td>
......@@ -562,7 +562,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the name of your company?</td>
<td>What is the Name of your Company?</td>
<td>
<br>
</td>
......@@ -728,7 +728,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Select the number of user accounts you want to configure</td>
<td>Select the Number of User Accounts you Want to Configure</td>
<td>
<br>
</td>
......@@ -1072,7 +1072,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Which accouting plan do you use?</td>
<td>Which Accounting Plan do you Use</td>
<td>
<br>
</td>
......@@ -1100,21 +1100,21 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the begin date of your current accounting period?</td>
<td>What is the Begin Date of your Current Accounting Period?</td>
<td>
<br>
</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What will be the end date of your current accounting period?</td>
<td>What will be the End Date of your Current Accounting Period?</td>
<td>
<br>
</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the name of this period?</td>
<td>What is the Name of this Period?</td>
<td>
<br>
</td>
......@@ -1146,7 +1146,7 @@
<tr>
<td>verifyValue</td>
<td>//input[@name="subfield_field_your_period_start_date_year"]</td>
<td>2012</td>
<td tal:content="python: DateTime().year()"></td>
</tr>
<tr>
<td>verifyValue</td>
......@@ -1161,7 +1161,7 @@
<tr>
<td>verifyValue</td>
<td>//input[@name="subfield_field_your_period_stop_date_year"]</td>
<td>2012</td>
<td tal:content="python: DateTime().year()"></td>
</tr>
<tr>
<td>verifyValue</td>
......@@ -1176,7 +1176,12 @@
<tr>
<td>verifyValue</td>
<td>//input[@name="field_your_period_title"]</td>
<td>2012</td>
<td tal:content="python: DateTime().year()"></td>
</tr>
<tr>
<td>select</td>
<td>//select[@name="field_your_accounting_plan"]</td>
<td>IAS-IFRS Compliant</td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -1262,28 +1267,28 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What email address should be used as From email address for automatically generated emails?</td>
<td>What Sender Address should be Used for Automatically Generated Emails?</td>
<td>
<br>
</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the currency used in your company?</td>
<td>What is the Currency Used in your Company?</td>
<td>
<br>
</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Which date format do you use?</td>
<td>Which Date Format do you Use?</td>
<td>
<br>
</td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Which translations do you want to use?</td>
<td>Which Translations do you Want to Use?</td>
<td>
<br>
</td>
......
......@@ -361,7 +361,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the name of your company?</td>
<td>What is the Name of your Company?</td>
<td> </td>
</tr>
<tr>
......@@ -561,7 +561,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Select the number of user accounts you want to configure</td>
<td>Select the Number of User Accounts you Want to Configure</td>
<td> </td>
</tr>
<tr>
......@@ -641,7 +641,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the name of your company?</td>
<td>What is the Name of your Company?</td>
<td> </td>
</tr>
<tr>
......@@ -781,7 +781,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Select the number of user accounts you want to configure</td>
<td>Select the Number of User Accounts you Want to Configure</td>
<td> </td>
</tr>
<tr>
......@@ -1058,7 +1058,7 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Which accouting plan do you use?</td>
<td>Which Accounting Plan do you Use</td>
<td> </td>
</tr>
<tr>
......@@ -1078,17 +1078,17 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the begin date of your current accounting period?</td>
<td>What is the Begin Date of your Current Accounting Period?</td>
<td> </td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What will be the end date of your current accounting period?</td>
<td>What will be the End Date of your Current Accounting Period?</td>
<td> </td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the name of this period?</td>
<td>What is the Name of this Period?</td>
<td> </td>
</tr>
<tr>
......@@ -1114,8 +1114,7 @@
<tr>
<td>verifyValue</td>
<td>//input[@name=&quot;subfield_field_your_period_start_date_year&quot;]</td>
<td tal:content="python:
modules['DateTime'].DateTime(modules['DateTime'].DateTime().year(), 1, 1).strftime('%Y')"> </td>
<td tal:content="python: DateTime().year()"></td>
</tr>
<tr>
<td>verifyValue</td>
......@@ -1130,7 +1129,7 @@
<tr>
<td>verifyValue</td>
<td>//input[@name=&quot;subfield_field_your_period_stop_date_year&quot;]</td>
<td tal:content="python: modules['DateTime'].DateTime(modules['DateTime'].DateTime().year(), 1, 1).strftime('%Y')"> </td>
<td tal:content="python: DateTime().year()"></td>
</tr>
<tr>
<td>verifyValue</td>
......@@ -1145,7 +1144,7 @@
<tr>
<td>verifyValue</td>
<td>//input[@name=&quot;field_your_period_title&quot;]</td>
<td tal:content="python: modules['DateTime'].DateTime(modules['DateTime'].DateTime().year(), 1, 1).strftime('%Y')"> </td>
<td tal:content="python: DateTime().year()"></td>
</tr>
<tr>
<td>clickAndWait</td>
......@@ -1215,22 +1214,22 @@
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What email address should be used as From email address for automatically generated emails?</td>
<td>What Sender Address should be Used for Automatically Generated Emails?</td>
<td> </td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>What is the currency used in your company?</td>
<td>What is the Currency Used in your Company?</td>
<td> </td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Which date format do you use?</td>
<td>Which Date Format do you Use?</td>
<td> </td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Which translations do you want to use?</td>
<td>Which Translations do you Want to Use?</td>
<td> </td>
</tr>
<tr>
......
......@@ -42,12 +42,15 @@ business_configuration = context.business_configuration_module.newContent(
business_configuration.setResource(workflow_path)
# (Re)Create the Person with already used login.
kw = dict(portal_type="Person",
# (Re)Create the Person and its ERP5 Login used to check that for user login
# (ERP5 Login.reference) unicity
kw = dict(portal_type="ERP5 Login",
reference=customer_user1_used_reference)
person = context.portal_catalog.getResultValue(**kw)
if person is None:
context.person_module.newContent(**kw)
erp5_login = context.portal_catalog.getResultValue(**kw)
if erp5_login is None:
erp5_login = context.person_module.newContent(portal_type='Person').newContent(**kw)
if erp5_login.getValidationState() != 'validated':
erp5_login.validate()
kw['reference'] = customer_user1_reference
person = context.portal_catalog.getResultValue(**kw)
......
......@@ -11263,7 +11263,7 @@ msgstr "Sélectionnez le document approprié dans la liste."
msgid "Select non reconciled transcations finished"
msgstr "Selection des écritures non rapprochées terminée"
msgid "Select the number of user accounts you want to configure"
msgid "Select the Number of User Accounts you Want to Configure"
msgstr "Sélectionnez le nombre de comptes utilisateur à configurer"
msgid "Sell"
......@@ -14551,19 +14551,19 @@ msgstr "Bienvenue. Vous êtes connecté."
msgid "What email address should be used as From email address for automatically generated emails?"
msgstr "Quelle adresse email souhaitez vous utilisez pour les envois automatiques d'emails depuis votre instance? (pour la GRC par exemple)"
msgid "What is the begin date of your current accounting period?"
msgid "What is the Begin Date of your Current Accounting Period?"
msgstr "A quelle date a débuté votre exercice en cours?"
msgid "What is the currency used in your company?"
msgid "What is the Currency Used in your Company?"
msgstr "Quelle devise souhaitez vous utiliser?"
msgid "What is the name of this period?"
msgid "What is the Name of this Period?"
msgstr "Quel nom souhaitez vous utiliser pour cette période?"
msgid "What is the name of your company?"
msgid "What is the Name of your Company?"
msgstr "Quel est le nom de votre entreprise?"
msgid "What will be the end date of your current accounting period?"
msgid "What will be the End Date of your Current Accounting Period?"
msgstr "Quelle est la date de fin de votre exercice en cours?"
msgid "When a user of ERP5 wants to materialize a purchase that has been done by his company, he or she should use a purchase order. Purchase orders contain some general information about the buyer and the seller, and contain purchase order lines."
......@@ -14575,13 +14575,13 @@ msgstr "salarié qui n'est pas physiquement présent sur son lieu de travail."
msgid "When the employee is present physically at work, and he is not in overtime"
msgstr "Le salarié est présent physiquement sur son lieu de travail et n'est pas en heures supplémentaires"
msgid "Which accouting plan do you use?"
msgid "Which Accounting Plan do you Use"
msgstr "Quel plan comptable souhaitez vous utiliser?"
msgid "Which date format do you use?"
msgid "Which Date Format do you Use?"
msgstr "Quel format souhaitez vous utiliser pour vos dates?"
msgid "Which translations do you want to use?"
msgid "Which Translations do you Want to Use?"
msgstr "Quelles langues souhaitez vous utiliser?"
msgid "Width"
......
......@@ -85,7 +85,6 @@ class ERP5(_ERP5):
or test_case in ('testERP5LdapCatalog', # XXX (Ivan), until LDAP server is available this test will alway fail
# tests reading selenium tables from erp5.com
# not maintained
'testFunctionalConfigurator',
'testFunctionalConfiguratorConsulting',
'testERP5eGov',
'testAccounting_l10n_fr_m9',
......
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