[UI TEST] Test added for Delivery Note (#10376)
This commit is contained in:
parent
7273cb7f54
commit
22baba2cff
37
erpnext/stock/doctype/delivery_note/test_delivery_note.js
Normal file
37
erpnext/stock/doctype/delivery_note/test_delivery_note.js
Normal file
@ -0,0 +1,37 @@
|
||||
QUnit.module('Stock');
|
||||
|
||||
QUnit.test("test delivery note", function(assert) {
|
||||
assert.expect(2);
|
||||
let done = assert.async();
|
||||
frappe.run_serially([
|
||||
() => {
|
||||
return frappe.tests.make('Delivery Note', [
|
||||
{customer:'Test Customer 1'},
|
||||
{items: [
|
||||
[
|
||||
{'item_code': 'Test Product 1'},
|
||||
{'qty': 5},
|
||||
]
|
||||
]},
|
||||
{shipping_address_name: 'Test1-Shipping'},
|
||||
{contact_person: 'Contact 1-Test Customer 1'},
|
||||
{taxes_and_charges: 'TEST In State GST'},
|
||||
{tc_name: 'Test Term 1'},
|
||||
{transporter_name:'TEST TRANSPORT'},
|
||||
{lr_no:'MH-04-FG 1111'}
|
||||
]);
|
||||
},
|
||||
() => cur_frm.save(),
|
||||
() => {
|
||||
// get_item_details
|
||||
assert.ok(cur_frm.doc.items[0].item_name=='Test Product 1', "Item name correct");
|
||||
assert.ok(cur_frm.doc.grand_total==590, " Grand Total correct");
|
||||
},
|
||||
() => frappe.tests.click_button('Submit'),
|
||||
() => frappe.tests.click_button('Yes'),
|
||||
() => frappe.timeout(0.3),
|
||||
() => done()
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -51,6 +51,7 @@ erpnext/stock/doctype/warehouse/test_warehouse.js
|
||||
erpnext/manufacturing/doctype/production_order/test_production_order.js #long
|
||||
erpnext/accounts/page/pos/test_pos.js
|
||||
erpnext/selling/doctype/product_bundle/test_product_bundle.js
|
||||
erpnext/stock/doctype/delivery_note/test_delivery_note.js
|
||||
erpnext/stock/doctype/material_request/tests/test_material_request.js
|
||||
erpnext/stock/doctype/material_request/tests/test_material_request_type_material_issue.js
|
||||
erpnext/stock/doctype/material_request/tests/test_material_request_type_material_transfer.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user