[UI Test] test added for Material Request (#10338)

* [UI Test] test added for Material Request

* [mod] date in material request
This commit is contained in:
Vishal Dhayagude 2017-08-09 13:08:38 +05:30 committed by Nabin Hait
parent 42251da131
commit da30a69ee7
2 changed files with 30 additions and 0 deletions

View File

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

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/material_request/tests/test_material_request.js
erpnext/schools/doctype/grading_scale/test_grading_scale.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_group/test_assessment_criteria_group.js
erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.js erpnext/schools/doctype/assessment_criteria/test_assessment_criteria.js