[test] test_customize_form.js

This commit is contained in:
Rushabh Mehta 2017-08-03 17:01:01 +05:30
parent e504671de8
commit 6dde90571d

View file

@ -7,11 +7,12 @@ QUnit.test("test customize form", function(assert) {
let done = assert.async();
frappe.run_serially([
() => frappe.set_route('Form', 'Customize Form'),
() => frappe.timeout(2),
() => frappe.timeout(3),
() => 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
() => 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),
// 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()
]);
});