[UI TEST] Test added for Delivery Note (#10376)

This commit is contained in:
Vishal Dhayagude 2017-08-11 17:17:30 +05:30 committed by Makarand Bauskar
parent 7273cb7f54
commit 22baba2cff
2 changed files with 38 additions and 0 deletions

View 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()
]);
});

View File

@ -51,6 +51,7 @@ erpnext/stock/doctype/warehouse/test_warehouse.js
erpnext/manufacturing/doctype/production_order/test_production_order.js #long erpnext/manufacturing/doctype/production_order/test_production_order.js #long
erpnext/accounts/page/pos/test_pos.js erpnext/accounts/page/pos/test_pos.js
erpnext/selling/doctype/product_bundle/test_product_bundle.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.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_issue.js
erpnext/stock/doctype/material_request/tests/test_material_request_type_material_transfer.js erpnext/stock/doctype/material_request/tests/test_material_request_type_material_transfer.js