From 131f0104b00df6ebf58eb4a528194932c9e7e841 Mon Sep 17 00:00:00 2001 From: tunde Date: Thu, 28 Sep 2017 11:50:38 +0100 Subject: [PATCH] fix production order ui test --- .../production_order/test_production_order.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/erpnext/manufacturing/doctype/production_order/test_production_order.js b/erpnext/manufacturing/doctype/production_order/test_production_order.js index 7ce67ba430..7b6f11ed0e 100644 --- a/erpnext/manufacturing/doctype/production_order/test_production_order.js +++ b/erpnext/manufacturing/doctype/production_order/test_production_order.js @@ -16,7 +16,7 @@ QUnit.test("test: production order", function (assert) { frappe.run_serially([ // test production order () => frappe.set_route("List", "Production Order"), - () => frappe.timeout(0.5), + () => frappe.timeout(3), // Create a laptop production order () => { @@ -29,7 +29,7 @@ QUnit.test("test: production order", function (assert) { {fg_warehouse: "Finished Goods - FT"} ]); }, - () => frappe.timeout(2), + () => frappe.timeout(3), () => { assert.equal(cur_frm.doc.planned_operating_cost, cur_frm.doc.total_operating_cost, "Total and Planned Cost is equal"); @@ -54,22 +54,25 @@ QUnit.test("test: production order", function (assert) { () => cur_frm.savesubmit(), () => frappe.timeout(1), () => frappe.click_button('Yes'), - () => frappe.timeout(1), + () => frappe.timeout(2.5), // Confirm the production order timesheet, save and submit it - () => frappe.click_link("TS-00"), - () => frappe.timeout(1), + () => frappe.click_link("Timesheet"), + () => frappe.timeout(2.5), + () => { + let name = cur_list.data[0].name; + frappe.click_link(name); + }, + () => frappe.timeout(2.5), () => frappe.click_button("Save"), () => frappe.timeout(1), () => frappe.click_button("Submit"), () => frappe.timeout(1), () => frappe.click_button("Yes"), - () => frappe.timeout(2), + () => frappe.timeout(2.5), // Start the production order process () => frappe.set_route("List", "Production Order"), - () => frappe.timeout(.5), - () => frappe.set_route("List", "Production Order"), () => frappe.timeout(2), () => frappe.click_link("Laptop"), () => frappe.timeout(1),