[UI Test] UI Test for Payment Request Added: (#10553)
This commit is contained in:
parent
7ba2a83182
commit
914b8463b7
@ -0,0 +1,52 @@
|
||||
QUnit.module('Sales Invoice');
|
||||
|
||||
QUnit.test("test sales Invoice with payment request", function(assert) {
|
||||
assert.expect(4);
|
||||
let done = assert.async();
|
||||
frappe.run_serially([
|
||||
() => {
|
||||
return frappe.tests.make('Sales Invoice', [
|
||||
{customer: 'Test Customer 1'},
|
||||
{items: [
|
||||
[
|
||||
{'qty': 5},
|
||||
{'item_code': 'Test Product 1'},
|
||||
]
|
||||
]},
|
||||
{update_stock:1},
|
||||
{customer_address: 'Test1-Billing'},
|
||||
{shipping_address_name: 'Test1-Shipping'},
|
||||
{contact_person: 'Contact 1-Test Customer 1'},
|
||||
{taxes_and_charges: 'TEST In State GST'},
|
||||
{tc_name: 'Test Term 1'},
|
||||
{terms: 'This is Test'}
|
||||
]);
|
||||
},
|
||||
() => cur_frm.save(),
|
||||
() => {
|
||||
// get_item_details
|
||||
assert.ok(cur_frm.doc.items[0].item_name=='Test Product 1', "Item name correct");
|
||||
// get tax details
|
||||
assert.ok(cur_frm.doc.taxes_and_charges=='TEST In State GST', "Tax details correct");
|
||||
// grand_total Calculated
|
||||
assert.ok(cur_frm.doc.grand_total==590, "Grad Total correct");
|
||||
|
||||
},
|
||||
() => frappe.tests.click_button('Submit'),
|
||||
() => frappe.tests.click_button('Yes'),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.tests.click_button('Close'),
|
||||
() => frappe.tests.click_button('Make'),
|
||||
() => frappe.tests.click_link('Payment Request'),
|
||||
() => frappe.timeout(0.2),
|
||||
() => { cur_frm.set_value('print_format','GST Tax Invoice');},
|
||||
() => { cur_frm.set_value('email_to','test@gmail.com');},
|
||||
() => cur_frm.save(),
|
||||
() => {
|
||||
// get payment details
|
||||
assert.ok(cur_frm.doc.grand_total==590, "grand total Correct");
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
});
|
||||
|
@ -82,6 +82,7 @@ erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation.js
|
||||
erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_taxes_and_charges.js
|
||||
erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice.js
|
||||
erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment.js
|
||||
erpnext/accounts/doctype/sales_invoice/tests/test_sales_invoice_with_payment_request.js
|
||||
erpnext/accounts/doctype/purchase_invoice/test_purchase_invoice.js
|
||||
erpnext/buying/doctype/supplier_quotation/tests/test_supplier_quotation_for_item_wise_discount.js
|
||||
erpnext/buying/doctype/purchase_order/tests/test_purchase_order.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user