[UI Test] UI Test added for Batch (#10564)
diff --git a/erpnext/stock/doctype/batch/test_batch.js b/erpnext/stock/doctype/batch/test_batch.js
new file mode 100644
index 0000000..af7f50f
--- /dev/null
+++ b/erpnext/stock/doctype/batch/test_batch.js
@@ -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()
+ ]);
+});
+
diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt
index a8b8d7e..d1dc96c 100644
--- a/erpnext/tests/ui/tests.txt
+++ b/erpnext/tests/ui/tests.txt
@@ -112,4 +112,5 @@
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
\ No newline at end of file
+erpnext/selling/doctype/quotation/tests/test_quotation_submit_cancel_amend.js
+erpnext/stock/doctype/batch/test_batch.js
\ No newline at end of file