[UI Test] UI Test added for Batch (#10564)

This commit is contained in:
Vishal Dhayagude 2017-08-28 11:10:26 +05:30 committed by Makarand Bauskar
parent c3a2204653
commit da2164373c
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,23 @@
QUnit.module('Stock');
QUnit.test("test Batch", function(assert) {
assert.expect(1);
let done = assert.async();
frappe.run_serially([
() => {
return frappe.tests.make('Batch', [
{batch_id:'TEST-BATCH-001'},
{item:'Test Product 4'},
{expiry_date:frappe.datetime.add_days(frappe.datetime.now_date(), 2)},
]);
},
() => cur_frm.save(),
() => {
// get_item_details
assert.ok(cur_frm.doc.batch_id=='TEST-BATCH-001', "Batch Id correct");
},
() => frappe.timeout(0.3),
() => done()
]);
});

View File

@ -112,4 +112,5 @@ 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
erpnext/selling/doctype/quotation/tests/test_quotation_submit_cancel_amend.js
erpnext/selling/doctype/quotation/tests/test_quotation_submit_cancel_amend.js
erpnext/stock/doctype/batch/test_batch.js