Commit 8b702ce5 authored by Gabriel Monnerat's avatar Gabriel Monnerat

- Fix css

- Add new asserts

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43955 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f740134b
......@@ -856,6 +856,7 @@ div#login-box {\n
margin: 0;\n
padding: 23px 23px 0 0;\n
float:right;\n
width: 23%;\n
}\n
\n
div#login-box input {\n
......
......@@ -117,12 +117,13 @@ function waitCreateUNGUser(paramStr){\n
});\n
}\n
\n
function displayLoginForm(){\n
function displayLoginForm(){ \n
$("a.ung_docs, img[alt=\'calendar_logo_box\'], table#create-new-user, img[alt=\'mail_logo_box\']").hide();\n
$("div.header-left div.field input, div.main-right, div.main-left").hide();\n
$.get("WebSection_loginDialog", function(data){\n
$("div.header-left fieldset.widget").append("<p>" + data + "</p>");\n
$("td#new-account-form").click(function(event){\n
$("div#login-box").css("width", "30%");\n
$("table#field_table, table#new-account-table").hide();\n
$("table#create-new-user input[type=\'text\'], table#create-new-user input[type=\'password\']").each(function(){\n
$(this).attr("value", "");\n
......@@ -469,6 +470,7 @@ $().ready(function(){\n
displayLoginForm();\n
}\n
if ($("table#create-new-user").css("display") != "none"){\n
$("div#login-box").css("width", "23%");\n
$("table#create-new-user").hide();\n
$("table#field_table, table#new-account-table").show();\n
}\n
......
......@@ -283,7 +283,7 @@ class TestUNG(ERP5TypeTestCase):
lastname="User",
email="g@g.com",
password="ung_password",
reference="ung_user")
login_name="ung_user")
self.portal.REQUEST.form.update(form_dict)
self.portal.ERPSite_createUNGUser()
self.stepTic()
......@@ -293,6 +293,7 @@ class TestUNG(ERP5TypeTestCase):
self.assertEquals(person.getValidationState(), "validated")
self.assertEquals(person.getEmail().getPortalType(), "Email")
self.assertEquals(person.getEmailText(), "g@g.com")
self.assertEquals(person.getReference(), "ung_user")
def testERP5Site_getUserValidationState(self):
"""Test script ERP5Site_getUserValidationState"""
......@@ -300,11 +301,12 @@ class TestUNG(ERP5TypeTestCase):
form_dict = dict(firstname="UNG",
lastname="User",
email="g@g.com",
reference="ung_reference")
login_name="ung_reference")
portal.REQUEST.form.update(form_dict)
portal.ERPSite_createUNGUser()
kw = dict(first_name=form_dict["firstname"],
last_name=form_dict["lastname"],
reference=form_dict["login_name"],
)
response = json.loads(portal.ERP5Site_getUserValidationState(**kw))
self.assertEquals(response.get("response"), False)
......@@ -316,3 +318,6 @@ class TestUNG(ERP5TypeTestCase):
)
response = json.loads(portal.ERP5Site_getUserValidationState(**kw))
self.assertEquals(response.get("response"), False)
self.login("ung_reference")
  • What is the intent of this log-in action ? The user does not have the permission to access person_module, and the next line only succeed because ERP5Site_getAuthenticatedMemberPersonValue has a proxy role (but is now deprecated and I'm trying to remove all callers).

Please register or sign in to reply
user = portal.ERP5Site_getAuthenticatedMemberPersonValue()
self.assertEquals(user.getFirstName(), "UNG")
\ No newline at end of file
271
\ No newline at end of file
272
\ 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