[UI Test] UI Test for Payment Entry (#10521)

This commit is contained in:
Vishal Dhayagude 2017-08-24 17:50:28 +05:30 committed by Makarand Bauskar
parent 1010a2a2a4
commit 17b2720f5b
2 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,29 @@
QUnit.module('Accounts');
QUnit.test("test payment entry", function(assert) {
assert.expect(1);
let done = assert.async();
frappe.run_serially([
() => {
return frappe.tests.make('Payment Entry', [
{payment_type:'Receive'},
{mode_of_payment:'Cash'},
{party_type:'Customer'},
{party:'Test Customer 3'},
{paid_amount:675},
{reference_no:123},
{reference_date: frappe.datetime.add_days(frappe.datetime.nowdate(), 0)},
]);
},
() => cur_frm.save(),
() => {
// get_item_details
assert.ok(cur_frm.doc.total_allocated_amount==675, "Allocated AmountCorrect");
},
() => frappe.tests.click_button('Submit'),
() => frappe.tests.click_button('Yes'),
() => frappe.timeout(0.3),
() => done()
]);
});

View File

@ -106,3 +106,4 @@ erpnext/schools/doctype/assessment_result/test_assessment_result.js
erpnext/schools/doctype/assessment_result_tool/test_assessment_result_tool.js
erpnext/accounts/doctype/journal_entry/test_journal_entry.js
erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js
erpnext/accounts/doctype/payment_entry/tests/test_payment_entry.js