[UI Test] UI Test added for Batch (#10564)
This commit is contained in:
parent
c3a2204653
commit
da2164373c
23
erpnext/stock/doctype/batch/test_batch.js
Normal file
23
erpnext/stock/doctype/batch/test_batch.js
Normal 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()
|
||||
]);
|
||||
});
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user