Browse Source

[test] test_customize_form.js

version-14
Rushabh Mehta 8 years ago
parent
commit
6dde90571d
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      frappe/custom/doctype/customize_form/test_customize_form.js

+ 6
- 4
frappe/custom/doctype/customize_form/test_customize_form.js View File

@@ -7,11 +7,12 @@ QUnit.test("test customize form", function(assert) {
let done = assert.async(); let done = assert.async();
frappe.run_serially([ frappe.run_serially([
() => frappe.set_route('Form', 'Customize Form'), () => frappe.set_route('Form', 'Customize Form'),
() => frappe.timeout(2),
() => frappe.timeout(3),
() => cur_frm.set_value('doc_type', 'ToDo'), () => cur_frm.set_value('doc_type', 'ToDo'),
() => frappe.timeout(2),
() => frappe.timeout(3),


() => assert.equal(cur_frm.doc.fields[1].fieldname, 'status', "Status Field"),
() => assert.equal(cur_frm.doc.fields[1].fieldname, 'status',
'check if second field is "status"'),


// open "status" row // open "status" row
() => cur_frm.fields_dict.fields.grid.grid_rows[1].toggle_view(), () => cur_frm.fields_dict.fields.grid.grid_rows[1].toggle_view(),
@@ -25,7 +26,8 @@ QUnit.test("test customize form", function(assert) {
() => frappe.timeout(0.5), () => frappe.timeout(0.5),


// status still exists // status still exists
() => assert.equal(cur_frm.doc.fields[1].fieldname, 'status', "Status Field Still Exists"),
() => assert.equal(cur_frm.doc.fields[1].fieldname, 'status',
'check if second field is still "status"'),
() => done() () => done()
]); ]);
}); });

Loading…
Cancel
Save