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 ...@@ -856,6 +856,7 @@ div#login-box {\n
margin: 0;\n margin: 0;\n
padding: 23px 23px 0 0;\n padding: 23px 23px 0 0;\n
float:right;\n float:right;\n
width: 23%;\n
}\n }\n
\n \n
div#login-box input {\n div#login-box input {\n
......
...@@ -117,12 +117,13 @@ function waitCreateUNGUser(paramStr){\n ...@@ -117,12 +117,13 @@ function waitCreateUNGUser(paramStr){\n
});\n });\n
}\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 $("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 $("div.header-left div.field input, div.main-right, div.main-left").hide();\n
$.get("WebSection_loginDialog", function(data){\n $.get("WebSection_loginDialog", function(data){\n
$("div.header-left fieldset.widget").append("<p>" + data + "</p>");\n $("div.header-left fieldset.widget").append("<p>" + data + "</p>");\n
$("td#new-account-form").click(function(event){\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#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 $("table#create-new-user input[type=\'text\'], table#create-new-user input[type=\'password\']").each(function(){\n
$(this).attr("value", "");\n $(this).attr("value", "");\n
...@@ -469,6 +470,7 @@ $().ready(function(){\n ...@@ -469,6 +470,7 @@ $().ready(function(){\n
displayLoginForm();\n displayLoginForm();\n
}\n }\n
if ($("table#create-new-user").css("display") != "none"){\n if ($("table#create-new-user").css("display") != "none"){\n
$("div#login-box").css("width", "23%");\n
$("table#create-new-user").hide();\n $("table#create-new-user").hide();\n
$("table#field_table, table#new-account-table").show();\n $("table#field_table, table#new-account-table").show();\n
}\n }\n
......
...@@ -283,7 +283,7 @@ class TestUNG(ERP5TypeTestCase): ...@@ -283,7 +283,7 @@ class TestUNG(ERP5TypeTestCase):
lastname="User", lastname="User",
email="g@g.com", email="g@g.com",
password="ung_password", password="ung_password",
reference="ung_user") login_name="ung_user")
self.portal.REQUEST.form.update(form_dict) self.portal.REQUEST.form.update(form_dict)
self.portal.ERPSite_createUNGUser() self.portal.ERPSite_createUNGUser()
self.stepTic() self.stepTic()
...@@ -293,6 +293,7 @@ class TestUNG(ERP5TypeTestCase): ...@@ -293,6 +293,7 @@ class TestUNG(ERP5TypeTestCase):
self.assertEquals(person.getValidationState(), "validated") self.assertEquals(person.getValidationState(), "validated")
self.assertEquals(person.getEmail().getPortalType(), "Email") self.assertEquals(person.getEmail().getPortalType(), "Email")
self.assertEquals(person.getEmailText(), "g@g.com") self.assertEquals(person.getEmailText(), "g@g.com")
self.assertEquals(person.getReference(), "ung_user")
def testERP5Site_getUserValidationState(self): def testERP5Site_getUserValidationState(self):
"""Test script ERP5Site_getUserValidationState""" """Test script ERP5Site_getUserValidationState"""
...@@ -300,11 +301,12 @@ class TestUNG(ERP5TypeTestCase): ...@@ -300,11 +301,12 @@ class TestUNG(ERP5TypeTestCase):
form_dict = dict(firstname="UNG", form_dict = dict(firstname="UNG",
lastname="User", lastname="User",
email="g@g.com", email="g@g.com",
reference="ung_reference") login_name="ung_reference")
portal.REQUEST.form.update(form_dict) portal.REQUEST.form.update(form_dict)
portal.ERPSite_createUNGUser() portal.ERPSite_createUNGUser()
kw = dict(first_name=form_dict["firstname"], kw = dict(first_name=form_dict["firstname"],
last_name=form_dict["lastname"], last_name=form_dict["lastname"],
reference=form_dict["login_name"],
) )
response = json.loads(portal.ERP5Site_getUserValidationState(**kw)) response = json.loads(portal.ERP5Site_getUserValidationState(**kw))
self.assertEquals(response.get("response"), False) self.assertEquals(response.get("response"), False)
...@@ -316,3 +318,6 @@ class TestUNG(ERP5TypeTestCase): ...@@ -316,3 +318,6 @@ class TestUNG(ERP5TypeTestCase):
) )
response = json.loads(portal.ERP5Site_getUserValidationState(**kw)) response = json.loads(portal.ERP5Site_getUserValidationState(**kw))
self.assertEquals(response.get("response"), False) self.assertEquals(response.get("response"), False)
self.login("ung_reference")
user = portal.ERP5Site_getAuthenticatedMemberPersonValue()
self.assertEquals(user.getFirstName(), "UNG")
\ No newline at end of file
271 272
\ No newline at end of file \ 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