[UI Test] test added for Material Request (#10338)
* [UI Test] test added for Material Request
* [mod] date in material request
diff --git a/erpnext/stock/doctype/material_request/tests/test_material_request.js b/erpnext/stock/doctype/material_request/tests/test_material_request.js
new file mode 100644
index 0000000..22d1088
--- /dev/null
+++ b/erpnext/stock/doctype/material_request/tests/test_material_request.js
@@ -0,0 +1,29 @@
+QUnit.module('Stock');
+
+QUnit.test("test material request", function(assert) {
+ assert.expect(1);
+ let done = assert.async();
+ frappe.run_serially([
+ () => {
+ return frappe.tests.make('Material Request', [
+ {items: [
+ [
+ {'schedule_date': frappe.datetime.add_days(frappe.datetime.nowdate(), 5)},
+ {'qty': 5},
+ {'item_code': 'Test Product 1'},
+ ]
+ ]},
+ ]);
+ },
+ () => cur_frm.save(),
+ () => {
+ // get_item_details
+ assert.ok(cur_frm.doc.items[0].item_name=='Test Product 1', "Item name correct");
+ },
+ () => frappe.tests.click_button('Submit'),
+ () => frappe.tests.click_button('Yes'),
+ () => frappe.timeout(0.3),
+ () => done()
+ ]);
+});
+
diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt
index 3b1b78e..6a50745 100644
--- a/erpnext/tests/ui/tests.txt
+++ b/erpnext/tests/ui/tests.txt
@@ -51,6 +51,7 @@
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/material_request/tests/test_material_request.js
erpnext/schools/doctype/grading_scale/test_grading_scale.js
erpnext/schools/doctype/assessment_criteria_group/test_assessment_criteria_group.js
erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.js