[UI Test] UI Test added for Stock Reconciliation (#10432)

* [UI Test] UI Test added for Stock Reconciliation

* [fix] Codacy
This commit is contained in:
Vishal Dhayagude 2017-08-18 15:01:20 +05:30 committed by Makarand Bauskar
parent 5a27aead06
commit 592e8c2e77
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,31 @@
QUnit.module('Stock');
QUnit.test("test Stock Reconciliation", function(assert) {
assert.expect(1);
let done = assert.async();
frappe.run_serially([
() => frappe.set_route('List', 'Stock Reconciliation'),
() => frappe.click_button('New'),
() => cur_frm.set_value('company','Razer Blade'),
() => frappe.click_button('Items'),
() => {cur_dialog.set_value('warehouse','Stores - RB'); },
() => frappe.timeout(0.5),
() => frappe.click_button('Update'),
() => {
cur_frm.doc.items[0].qty = 150;
cur_frm.refresh_fields('items');},
() => frappe.timeout(0.5),
() => cur_frm.set_value('expense_account','Stock Adjustment - RB'),
() => cur_frm.set_value('cost_center','Main - RB'),
() => cur_frm.save(),
() => {
// get_item_details
assert.ok(cur_frm.doc.expense_account=='Stock Adjustment - RB', "expense_account correct");
},
() => frappe.tests.click_button('Submit'),
() => frappe.tests.click_button('Yes'),
() => frappe.timeout(0.3),
() => done()
]);
});

View File

@ -101,3 +101,4 @@ erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_item_wise_d
erpnext/buying/doctype/purchase_order/tests/test_purchase_order_with_taxes_and_charges.js
erpnext/buying/doctype/purchase_order/tests/test_purchase_order_receipt.js
erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.js
erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js