mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-28 06:08:25 +00:00
[refactor] account.js to new style (#9787)
* [fix] conference site update * [test] run all js tests
This commit is contained in:
committed by
Makarand Bauskar
parent
319c58266b
commit
812853aa86
27
erpnext/tests/ui/accounts/test_account.js
Normal file
27
erpnext/tests/ui/accounts/test_account.js
Normal 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()
|
||||
]);
|
||||
});
|
||||
Reference in New Issue
Block a user