[refactor] account.js to new style (#9787)

* [fix] conference site update

* [test] run all js tests
This commit is contained in:
Rushabh Mehta
2017-07-14 15:28:04 +05:30
committed by Makarand Bauskar
parent 319c58266b
commit 812853aa86
2 changed files with 115 additions and 88 deletions

View File

@@ -0,0 +1,27 @@
QUnit.module('accounts');
QUnit.test("test account", function(assert) {
assert.expect(4);
let done = assert.async();
frappe.run_serially([
() => frappe.set_route('Tree', 'Account'),
() => frappe.tests.click_button('Expand All'),
() => frappe.tests.click_link('Debtors'),
() => frappe.tests.click_button('Edit'),
() => frappe.timeout(1),
() => {
assert.ok(cur_frm.doc.root_type=='Asset');
assert.ok(cur_frm.doc.report_type=='Balance Sheet');
assert.ok(cur_frm.doc.account_type=='Receivable');
},
() => frappe.tests.click_button('Ledger'),
() => frappe.timeout(1),
() => {
// check if general ledger report shown
assert.deepEqual(frappe.get_route(), ['query-report', 'General Ledger']);
window.history.back();
return frappe.timeout(1);
},
() => done()
]);
});