test: Add test case for docfield length property update
This commit is contained in:
parent
80be431478
commit
cd9b07b3bb
1 changed files with 13 additions and 0 deletions
|
|
@ -188,6 +188,19 @@ class TestCustomizeForm(unittest.TestCase):
|
|||
def test_core_doctype_customization(self):
|
||||
self.assertRaises(frappe.ValidationError, self.get_customize_form, 'User')
|
||||
|
||||
def test_save_customization_length_field_property(self):
|
||||
# Using Notification Log doctype as it doesn't have any other custom fields
|
||||
d = self.get_customize_form("Notification Log")
|
||||
|
||||
document_name = d.get("fields", {"fieldname": "document_name"})[0]
|
||||
document_name.length = 255
|
||||
d.run_method("save_customization")
|
||||
|
||||
self.assertEqual(frappe.db.get_value("Property Setter",
|
||||
{"doc_type": "Notification Log", "property": "length", "field_name": "document_name"}, "value"), '255')
|
||||
|
||||
self.assertTrue(d.flags.update_db)
|
||||
|
||||
def test_custom_link(self):
|
||||
try:
|
||||
# create a dummy doctype linked to Event
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue