Fixes ui tests
This commit is contained in:
parent
ea832b8157
commit
092f6d3739
@ -7,7 +7,7 @@ QUnit.test("test payment entry", function(assert) {
|
||||
() => {
|
||||
return frappe.tests.make('Sales Invoice', [
|
||||
{customer: 'Test Customer 1'},
|
||||
{company: '_Test Company'},
|
||||
{company: 'For Testing'},
|
||||
{currency: 'INR'},
|
||||
{selling_price_list: '_Test Price List'},
|
||||
{items: [
|
||||
@ -29,12 +29,12 @@ QUnit.test("test payment entry", function(assert) {
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.click_link('Payment'),
|
||||
() => frappe.timeout(2),
|
||||
() => cur_frm.set_value("paid_to", "_Test Cash - _TC"),
|
||||
() => cur_frm.set_value("paid_to", "_Test Cash - FT"),
|
||||
() => frappe.timeout(0.5),
|
||||
() => {
|
||||
assert.equal(frappe.get_route()[1], 'Payment Entry', 'made payment entry');
|
||||
assert.equal(cur_frm.doc.party, 'Test Customer 1', 'customer set in payment entry');
|
||||
assert.equal(cur_frm.doc.paid_from, 'Debtors - _TC', 'customer account set in payment entry');
|
||||
assert.equal(cur_frm.doc.paid_from, 'Debtors - FT', 'customer account set in payment entry');
|
||||
assert.equal(cur_frm.doc.paid_amount, 100, 'paid amount set in payment entry');
|
||||
assert.equal(cur_frm.doc.references[0].allocated_amount, 100,
|
||||
'amount allocated against sales invoice');
|
||||
@ -50,10 +50,10 @@ QUnit.test("test payment entry", function(assert) {
|
||||
assert.equal(cur_frm.doc.difference_amount, 5, 'difference amount is 5');
|
||||
},
|
||||
() => {
|
||||
frappe.db.set_value("Company", "_Test Company", "write_off_account", "_Test Write Off - _TC");
|
||||
frappe.db.set_value("Company", "For Testing", "write_off_account", "_Test Write Off - FT");
|
||||
frappe.timeout(1);
|
||||
frappe.db.set_value("Company", "_Test Company",
|
||||
"exchange_gain_loss_account", "_Test Exchange Gain/Loss - _TC");
|
||||
frappe.db.set_value("Company", "For Testing",
|
||||
"exchange_gain_loss_account", "_Test Exchange Gain/Loss - FT");
|
||||
},
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.click_button('Write Off Difference Amount'),
|
||||
|
@ -12,7 +12,7 @@ QUnit.test("Test: Request for Quotation", function (assert) {
|
||||
() => frappe.new_doc("Request for Quotation"),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value("transaction_date", "04-04-2017"),
|
||||
() => cur_frm.set_value("company", "_Test Company"),
|
||||
() => cur_frm.set_value("company", "For Testing"),
|
||||
// Add Suppliers
|
||||
() => {
|
||||
cur_frm.fields_dict.suppliers.grid.grid_rows[0].toggle_view();
|
||||
@ -62,7 +62,7 @@ QUnit.test("Test: Request for Quotation", function (assert) {
|
||||
},
|
||||
() => frappe.timeout(2),
|
||||
() => {
|
||||
cur_frm.fields_dict.items.grid.grid_rows[0].doc.warehouse = "_Test Warehouse - _TC";
|
||||
cur_frm.fields_dict.items.grid.grid_rows[0].doc.warehouse = "_Test Warehouse - FT";
|
||||
},
|
||||
() => frappe.click_button('Save'),
|
||||
() => frappe.timeout(1),
|
||||
@ -104,7 +104,7 @@ QUnit.test("Test: Request for Quotation", function (assert) {
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.click_button('Make Supplier Quotation'),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value("company", "_Test Company"),
|
||||
() => cur_frm.set_value("company", "For Testing"),
|
||||
() => cur_frm.fields_dict.items.grid.grid_rows[0].doc.rate = 4.99,
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.click_button('Save'),
|
||||
|
@ -13,8 +13,8 @@ QUnit.test("test: supplier", function(assert) {
|
||||
{credit_days_based_on: 'Fixed Days'},
|
||||
{accounts: [
|
||||
[
|
||||
{'company': "Test Company"},
|
||||
{'account': "Creditors - TC"}
|
||||
{'company': "For Testing"},
|
||||
{'account': "Creditors - FT"}
|
||||
]]
|
||||
}
|
||||
]);
|
||||
@ -68,7 +68,7 @@ QUnit.test("test: supplier", function(assert) {
|
||||
assert.ok(cur_frm.doc.supplier_name == 'Test Supplier', "Name correct");
|
||||
assert.ok(cur_frm.doc.supplier_type == 'Hardware', "Type correct");
|
||||
assert.ok(cur_frm.doc.default_currency == 'INR', "Currency correct");
|
||||
assert.ok(cur_frm.doc.accounts[0].account == 'Creditors - '+frappe.get_abbr('Test Company'), " Account Head abbr correct");
|
||||
assert.ok(cur_frm.doc.accounts[0].account == 'Creditors - '+frappe.get_abbr('For Testing'), " Account Head abbr correct");
|
||||
assert.ok($('.address-box:nth-child(3) p').text().includes('Shipping City 3'), "Address correct");
|
||||
assert.ok($('.col-sm-6+ .col-sm-6 .h6').text().includes('Contact 3'), "Contact correct");
|
||||
},
|
||||
|
@ -8,13 +8,13 @@ QUnit.test("test: supplier quotation with item wise discount", function(assert){
|
||||
() => {
|
||||
return frappe.tests.make('Supplier Quotation', [
|
||||
{supplier: 'Test Supplier'},
|
||||
{company: 'Test Company'},
|
||||
{company: 'For Testing'},
|
||||
{items: [
|
||||
[
|
||||
{"item_code": 'Test Product 4'},
|
||||
{"qty": 5},
|
||||
{"uom": 'Unit'},
|
||||
{"warehouse": 'All Warehouses - TC'},
|
||||
{"warehouse": 'All Warehouses - FT'},
|
||||
{'discount_percentage': 10},
|
||||
]
|
||||
]}
|
||||
|
@ -19,7 +19,7 @@ QUnit.test("test: item", function (assert) {
|
||||
{is_stock_item: is_stock_item},
|
||||
{standard_rate: keyboard_cost},
|
||||
{opening_stock: no_of_items_to_stock},
|
||||
{default_warehouse: "Stores - RB"}
|
||||
{default_warehouse: "Stores - FT"}
|
||||
]
|
||||
),
|
||||
() => {
|
||||
@ -45,7 +45,7 @@ QUnit.test("test: item", function (assert) {
|
||||
{is_stock_item: is_stock_item},
|
||||
{standard_rate: screen_cost},
|
||||
{opening_stock: no_of_items_to_stock},
|
||||
{default_warehouse: "Stores - RB"}
|
||||
{default_warehouse: "Stores - FT"}
|
||||
]
|
||||
),
|
||||
|
||||
@ -57,7 +57,7 @@ QUnit.test("test: item", function (assert) {
|
||||
{is_stock_item: is_stock_item},
|
||||
{standard_rate: CPU_cost},
|
||||
{opening_stock: no_of_items_to_stock},
|
||||
{default_warehouse: "Stores - RB"}
|
||||
{default_warehouse: "Stores - FT"}
|
||||
]
|
||||
),
|
||||
|
||||
@ -66,7 +66,7 @@ QUnit.test("test: item", function (assert) {
|
||||
"Item", [
|
||||
{item_code: "Laptop"},
|
||||
{item_group: "Products"},
|
||||
{default_warehouse: "Stores - RB"}
|
||||
{default_warehouse: "Stores - FT"}
|
||||
]
|
||||
),
|
||||
() => frappe.tests.make(
|
||||
@ -85,7 +85,7 @@ QUnit.test("test: item", function (assert) {
|
||||
{is_stock_item: is_stock_item},
|
||||
{standard_rate: scrap_cost},
|
||||
{opening_stock: no_of_items_to_stock},
|
||||
{default_warehouse: "Stores - RB"}
|
||||
{default_warehouse: "Stores - FT"}
|
||||
]
|
||||
),
|
||||
() => frappe.tests.make(
|
||||
|
@ -29,7 +29,7 @@ QUnit.test("Test: Expense Claim [HR]", function (assert) {
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value('employee',employee_name),
|
||||
() => cur_frm.set_value('employee_name','Test Employee 1'),
|
||||
() => cur_frm.set_value('company','Test Company'),
|
||||
() => cur_frm.set_value('company','For Testing'),
|
||||
() => frappe.click_button('Calculate Total Score'),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.save(),
|
||||
|
@ -13,7 +13,7 @@ QUnit.test("Test: Attendance [HR]", function (assert) {
|
||||
() => assert.equal("Attendance", cur_frm.doctype,
|
||||
"Form for new Attendance opened successfully."),
|
||||
// set values in form
|
||||
() => cur_frm.set_value("company", "Test Company"),
|
||||
() => cur_frm.set_value("company", "For Testing"),
|
||||
() => {
|
||||
frappe.db.get_value('Employee', {'employee_name':'Test Employee 1'}, 'name', function(r) {
|
||||
cur_frm.set_value("employee", r.name)
|
||||
|
@ -4,14 +4,14 @@ QUnit.test("Test: Employee [HR]", function (assert) {
|
||||
assert.expect(4);
|
||||
let done = assert.async();
|
||||
// let today_date = frappe.datetime.nowdate();
|
||||
let employee_creation = (name,joining_date,birth_date) => {
|
||||
let employee_creation = (name, joining_date, birth_date) => {
|
||||
frappe.run_serially([
|
||||
// test employee creation
|
||||
() => {
|
||||
frappe.tests.make('Employee', [
|
||||
{ employee_name: name},
|
||||
{ salutation: 'Mr'},
|
||||
{ company: 'Test Company'},
|
||||
{ company: 'For Testing'},
|
||||
{ date_of_joining: joining_date},
|
||||
{ date_of_birth: birth_date},
|
||||
{ employment_type: 'Test Employment Type'},
|
||||
@ -32,9 +32,9 @@ QUnit.test("Test: Employee [HR]", function (assert) {
|
||||
};
|
||||
frappe.run_serially([
|
||||
() => employee_creation('Test Employee 1','2017-04-01','1992-02-02'),
|
||||
() => frappe.timeout(6),
|
||||
() => frappe.timeout(10),
|
||||
() => employee_creation('Test Employee 3','2017-04-01','1992-02-02'),
|
||||
() => frappe.timeout(4),
|
||||
() => frappe.timeout(10),
|
||||
() => done()
|
||||
]);
|
||||
});
|
@ -12,7 +12,7 @@ QUnit.test("Test: Employee attendance tool [HR]", function (assert) {
|
||||
return frappe.tests.make('Employee', [
|
||||
{salutation: "Mr"},
|
||||
{employee_name: "Test Employee 2"},
|
||||
{company: "Test Company"},
|
||||
{company: "For Testing"},
|
||||
{date_of_joining: frappe.datetime.add_months(today_date, -2)}, // joined 2 month from now
|
||||
{date_of_birth: frappe.datetime.add_months(today_date, -240)}, // age is 20 years
|
||||
{employment_type: "Test Employment type"},
|
||||
@ -30,7 +30,7 @@ QUnit.test("Test: Employee attendance tool [HR]", function (assert) {
|
||||
() => cur_frm.set_value("date", date_of_attendance),
|
||||
() => cur_frm.set_value("branch", "Test Branch"),
|
||||
() => cur_frm.set_value("department", "Test Department"),
|
||||
() => cur_frm.set_value("company", "Test Company"),
|
||||
() => cur_frm.set_value("company", "For Testing"),
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.click_button('Check all'),
|
||||
() => frappe.click_button('Mark Present'),
|
||||
@ -45,7 +45,7 @@ QUnit.test("Test: Employee attendance tool [HR]", function (assert) {
|
||||
filters: {
|
||||
"branch": "Test Branch",
|
||||
"department": "Test Department",
|
||||
"company": "Test Company",
|
||||
"company": "For Testing",
|
||||
"status": "Active"
|
||||
}
|
||||
},
|
||||
|
@ -15,14 +15,14 @@ QUnit.test("Test Loan [HR]", function(assert) {
|
||||
(r) => {
|
||||
// Creating loan for an employee
|
||||
return frappe.tests.make('Employee Loan', [
|
||||
{ company: 'Test Company'},
|
||||
{ company: 'For Testing'},
|
||||
{ posting_date: '2017-08-26'},
|
||||
{ employee: employee_name},
|
||||
{ employee_loan_application: r.message.name},
|
||||
{ disbursement_date: '2018-08-26'},
|
||||
{ mode_of_payment: 'Cash'},
|
||||
{ employee_loan_account: 'Temporary Opening - TC'},
|
||||
{ interest_income_account: 'Service - TC'}
|
||||
{ employee_loan_account: 'Temporary Opening - FT'},
|
||||
{ interest_income_account: 'Service - FT'}
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(3),
|
||||
|
@ -13,7 +13,7 @@ QUnit.test("Test: Employee Loan Application [HR]", function (assert) {
|
||||
},
|
||||
() => {
|
||||
frappe.tests.make('Employee Loan Application', [
|
||||
{ company: 'Test Company'},
|
||||
{ company: 'For Testing'},
|
||||
{ employee: employee_name},
|
||||
{ employee_name: 'Test Employee 1'},
|
||||
{ status: 'Approved'},
|
||||
|
@ -30,9 +30,9 @@ QUnit.test("Test: Expense Claim [HR]", function (assert) {
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value('employee',employee_name),
|
||||
() => cur_frm.set_value('employee_name','Test Employee 1'),
|
||||
() => cur_frm.set_value('company','Test Company'),
|
||||
() => cur_frm.set_value('payable_account','Creditors - TC'),
|
||||
() => cur_frm.set_value('cost_center','Main - TC'),
|
||||
() => cur_frm.set_value('company','For Testing'),
|
||||
() => cur_frm.set_value('payable_account','Creditors - FT'),
|
||||
() => cur_frm.set_value('cost_center','Main - FT'),
|
||||
() => cur_frm.set_value('mode_of_payment','Cash'),
|
||||
() => cur_frm.save(),
|
||||
() => frappe.timeout(1),
|
||||
|
@ -11,8 +11,8 @@ QUnit.test("Test: Expense Claim Type [HR]", function (assert) {
|
||||
{ description:'This is just a test'},
|
||||
{ accounts: [
|
||||
[
|
||||
{ company: 'Test Company'},
|
||||
{ default_account: 'Round Off - TC'}
|
||||
{ company: 'For Testing'},
|
||||
{ default_account: 'Round Off - FT'}
|
||||
]
|
||||
]},
|
||||
]);
|
||||
|
@ -11,7 +11,7 @@ QUnit.test("Test: Leave block list [HR]", function (assert) {
|
||||
() => frappe.new_doc("Leave Block List"),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value("leave_block_list_name", "Test Leave block list"),
|
||||
() => cur_frm.set_value("company", "Test Company"),
|
||||
() => cur_frm.set_value("company", "For Testing"),
|
||||
() => frappe.click_button('Add Row'),
|
||||
() => {
|
||||
cur_frm.fields_dict.leave_block_list_dates.grid.grid_rows[0].doc.block_date = today_date;
|
||||
|
@ -10,7 +10,7 @@ QUnit.test("Test: Leave control panel [HR]", function (assert) {
|
||||
() => frappe.set_route("Form", "Leave Control Panel"),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value("leave_type", "Test Leave type"),
|
||||
() => cur_frm.set_value("company", "Test Company"),
|
||||
() => cur_frm.set_value("company", "For Testing"),
|
||||
() => cur_frm.set_value("employment_type", "Test Employment Type"),
|
||||
() => cur_frm.set_value("branch", "Test Branch"),
|
||||
() => cur_frm.set_value("department", "Test Department"),
|
||||
@ -33,7 +33,7 @@ QUnit.test("Test: Leave control panel [HR]", function (assert) {
|
||||
filters: {
|
||||
"branch": "Test Branch",
|
||||
"department": "Test Department",
|
||||
"company": "Test Company",
|
||||
"company": "For Testing",
|
||||
"designation": "Test Designation",
|
||||
"status": "Active"
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ QUnit.test("Test: Process Payroll [HR]", function (assert) {
|
||||
// Creating Process Payroll for specific company
|
||||
() => frappe.set_route('Form','Process Payroll'),
|
||||
() => {
|
||||
cur_frm.set_value('company','Test Company'),
|
||||
cur_frm.set_value('company','For Testing'),
|
||||
frappe.timeout(1),
|
||||
cur_frm.set_value('payroll_frequency','Monthly'),
|
||||
cur_frm.set_value('start_date','2017-08-01'),
|
||||
|
@ -13,7 +13,7 @@ QUnit.test("test Salary Structure", function(assert) {
|
||||
(r) => {
|
||||
// Creating Salary Structure for employees);
|
||||
frappe.tests.make('Salary Structure', [
|
||||
{ company: 'Test Company'},
|
||||
{ company: 'For Testing'},
|
||||
{ payroll_frequency: 'Monthly'},
|
||||
{ employees: [
|
||||
[
|
||||
@ -43,7 +43,7 @@ QUnit.test("test Salary Structure", function(assert) {
|
||||
{formula: '(B+LE) * .20'}
|
||||
]
|
||||
]},
|
||||
{ payment_account: 'CASH - TC'},
|
||||
{ payment_account: 'CASH - FT'},
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(10),
|
||||
|
@ -12,7 +12,7 @@ QUnit.test("test: item", function (assert) {
|
||||
{item: "Laptop"},
|
||||
{quantity: 1},
|
||||
{with_operations: 1},
|
||||
{company: "Razer Blade"},
|
||||
{company: "For Testing"},
|
||||
{operations: [
|
||||
[
|
||||
{operation: "Assemble CPU"},
|
||||
|
@ -2,7 +2,7 @@ QUnit.test("test: production order", function (assert) {
|
||||
assert.expect(25);
|
||||
let done = assert.async();
|
||||
let laptop_quantity = 5;
|
||||
let items = ["Screen", "CPU", "Keyboard"];
|
||||
let items = ["CPU", "Keyboard", "Screen"];
|
||||
let operation_items = ["CPU", "Keyboard", "Screen"];
|
||||
let click_make = () => {
|
||||
let element = $(`.btn-primary:contains("Make"):visible`);
|
||||
@ -19,22 +19,17 @@ QUnit.test("test: production order", function (assert) {
|
||||
() => frappe.timeout(0.5),
|
||||
|
||||
// Create a laptop production order
|
||||
() => frappe.new_doc("Production Order"),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value("production_item", "Laptop"),
|
||||
() => {
|
||||
return frappe.tests.make('Production Order', [
|
||||
{production_item: 'Laptop'},
|
||||
{company: 'For Testing'},
|
||||
{qty: laptop_quantity},
|
||||
{scrap_warehouse: "Laptop Scrap Warehouse - FT"},
|
||||
{wip_warehouse: "Work In Progress - FT"},
|
||||
{fg_warehouse: "Finished Goods - FT"}
|
||||
]);
|
||||
},
|
||||
() => frappe.timeout(2),
|
||||
() => cur_frm.set_value("company", "Razer Blade"),
|
||||
() => frappe.timeout(2),
|
||||
() => cur_frm.set_value("qty", laptop_quantity),
|
||||
() => frappe.timeout(2),
|
||||
() => cur_frm.set_value("scrap_warehouse", "Laptop Scrap Warehouse - RB"),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value("wip_warehouse", "Work In Progress - RB"),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value("fg_warehouse", "Finished Goods - RB"),
|
||||
() => cur_frm.save(),
|
||||
() => frappe.timeout(2),
|
||||
|
||||
() => {
|
||||
assert.equal(cur_frm.doc.planned_operating_cost, cur_frm.doc.total_operating_cost,
|
||||
"Total and Planned Cost is equal");
|
||||
@ -43,7 +38,7 @@ QUnit.test("test: production order", function (assert) {
|
||||
|
||||
items.forEach(function(item, index) {
|
||||
assert.equal(item, cur_frm.doc.required_items[index].item_code, `Required item ${item} added`);
|
||||
assert.equal("Stores - RB", cur_frm.doc.required_items[index].source_warehouse, `Item ${item} warhouse verified`);
|
||||
assert.equal("Stores - FT", cur_frm.doc.required_items[index].source_warehouse, `Item ${item} warhouse verified`);
|
||||
assert.equal("5", cur_frm.doc.required_items[index].required_qty, `Item ${item} quantity verified`);
|
||||
});
|
||||
|
||||
@ -73,7 +68,7 @@ QUnit.test("test: production order", function (assert) {
|
||||
|
||||
// Start the production order process
|
||||
() => frappe.set_route("List", "Production Order"),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.timeout(.5),
|
||||
() => frappe.set_route("List", "Production Order"),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.click_link("Laptop"),
|
||||
@ -81,6 +76,7 @@ QUnit.test("test: production order", function (assert) {
|
||||
() => frappe.click_button("Start"),
|
||||
() => frappe.timeout(0.5),
|
||||
() => click_make(),
|
||||
() => frappe.timeout(1),
|
||||
() => frappe.click_button("Save"),
|
||||
() => frappe.timeout(0.5),
|
||||
|
||||
|
@ -278,6 +278,8 @@ class Company(Document):
|
||||
frappe.db.sql("""update `tabSingles` set value=""
|
||||
where doctype='Global Defaults' and field='default_company'
|
||||
and value=%s""", self.name)
|
||||
# delete mode of payment account
|
||||
frappe.db.sql("delete from `tabMode of Payment Account` where company=%s", self.name)
|
||||
|
||||
@frappe.whitelist()
|
||||
def replace_abbr(company, old, new):
|
||||
|
@ -1,7 +1,7 @@
|
||||
QUnit.module('setup');
|
||||
|
||||
QUnit.test("Test: Company [SetUp]", function (assert) {
|
||||
assert.expect(1);
|
||||
assert.expect(2);
|
||||
let done = assert.async();
|
||||
|
||||
frappe.run_serially([
|
||||
@ -16,8 +16,10 @@ QUnit.test("Test: Company [SetUp]", function (assert) {
|
||||
// save form
|
||||
() => cur_frm.save(),
|
||||
() => frappe.timeout(1),
|
||||
() => assert.equal("Test Company", cur_frm.doc.company_name,
|
||||
'name of company correctly saved'),
|
||||
() => assert.equal("Debtors - TC", cur_frm.doc.default_receivable_account,
|
||||
'chart of acounts created'),
|
||||
() => assert.equal("Main - TC", cur_frm.doc.cost_center,
|
||||
'chart of cost centers created'),
|
||||
() => done()
|
||||
]);
|
||||
});
|
@ -8,7 +8,7 @@ QUnit.test("Test: Company", function (assert) {
|
||||
() => frappe.set_route("List", "Company"),
|
||||
() => frappe.new_doc("Company"),
|
||||
() => frappe.timeout(1),
|
||||
() => cur_frm.set_value("company_name", "Razer Blade"),
|
||||
() => cur_frm.set_value("company_name", "For Testing"),
|
||||
() => cur_frm.set_value("abbr", "RB"),
|
||||
() => cur_frm.set_value("default_currency", "INR"),
|
||||
() => cur_frm.save(),
|
||||
|
@ -6,21 +6,21 @@ QUnit.test("test Stock Reconciliation", function(assert) {
|
||||
frappe.run_serially([
|
||||
() => frappe.set_route('List', 'Stock Reconciliation'),
|
||||
() => frappe.click_button('New'),
|
||||
() => cur_frm.set_value('company','Razer Blade'),
|
||||
() => cur_frm.set_value('company','For Testing'),
|
||||
() => frappe.click_button('Items'),
|
||||
() => {cur_dialog.set_value('warehouse','Stores - RB'); },
|
||||
() => {cur_dialog.set_value('warehouse','Stores - FT'); },
|
||||
() => 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.set_value('expense_account','Stock Adjustment - FT'),
|
||||
() => cur_frm.set_value('cost_center','Main - FT'),
|
||||
() => cur_frm.save(),
|
||||
() => {
|
||||
// get_item_details
|
||||
assert.ok(cur_frm.doc.expense_account=='Stock Adjustment - RB', "expense_account correct");
|
||||
assert.ok(cur_frm.doc.expense_account=='Stock Adjustment - FT', "expense_account correct");
|
||||
},
|
||||
() => frappe.tests.click_button('Submit'),
|
||||
() => frappe.tests.click_button('Yes'),
|
||||
|
@ -10,7 +10,7 @@ QUnit.test("test: warehouse", function (assert) {
|
||||
() => frappe.tests.make(
|
||||
"Warehouse", [
|
||||
{warehouse_name: "Laptop Scrap Warehouse"},
|
||||
{company: "Razer Blade"}
|
||||
{company: "For Testing"}
|
||||
]
|
||||
),
|
||||
|
||||
|
@ -1,55 +1,55 @@
|
||||
erpnext/tests/ui/make_fixtures.js #long
|
||||
erpnext/setup/doctype/company/tests/test_company.js
|
||||
erpnext/accounts/doctype/account/test_account.js
|
||||
erpnext/accounts/doctype/account/test_make_tax_account.js
|
||||
erpnext/accounts/doctype/pricing_rule/test_pricing_rule.js
|
||||
erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js
|
||||
erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js
|
||||
erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js
|
||||
erpnext/crm/doctype/lead/test_lead.js
|
||||
erpnext/crm/doctype/opportunity/test_opportunity.js
|
||||
erpnext/setup/doctype/company/tests/test_company_production.js
|
||||
erpnext/crm/doctype/item/test_item.js
|
||||
erpnext/selling/doctype/quotation/tests/test_quotation_with_discount_on_grand_total.js
|
||||
erpnext/selling/doctype/quotation/tests/test_quotation_with_item_wise_discount.js
|
||||
erpnext/selling/doctype/quotation/tests/test_quotation_with_multi_uom.js
|
||||
erpnext/selling/doctype/quotation/tests/test_quotation_with_taxes_and_charges.js
|
||||
erpnext/selling/doctype/quotation/tests/test_quotation_with_shipping_rule.js
|
||||
erpnext/selling/doctype/quotation/tests/test_quotation.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multiple_delivery_date.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order_with_item_wise_discount.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multi_uom.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order_with_discount_on_grand_total.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order_with_taxes_and_charges.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order_with_shipping_rule.js
|
||||
erpnext/selling/doctype/sales_order/tests/test_sales_order_with_pricing_rule.js
|
||||
erpnext/manufacturing/doctype/workstation/test_workstation.js
|
||||
erpnext/manufacturing/doctype/operation/test_operation.js
|
||||
erpnext/manufacturing/doctype/bom/test_bom.js
|
||||
erpnext/projects/doctype/project/project_timesheet.js
|
||||
erpnext/hr/doctype/holiday_list/test_holiday_list.js
|
||||
erpnext/hr/doctype/branch/test_branch.js
|
||||
erpnext/hr/doctype/leave_block_list/test_leave_block_list.js
|
||||
erpnext/hr/doctype/department/test_department.js
|
||||
erpnext/hr/doctype/designation/test_designation.js
|
||||
erpnext/hr/doctype/employment_type/test_employment_type.js
|
||||
erpnext/hr/doctype/employee/test_employee.js
|
||||
erpnext/hr/doctype/employee_attendance_tool/test_employee_attendance_tool.js
|
||||
erpnext/hr/doctype/attendance/test_attendance.js
|
||||
erpnext/hr/doctype/leave_type/test_leave_type.js
|
||||
erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.js
|
||||
erpnext/hr/doctype/leave_allocation/test_leave_allocation.js
|
||||
erpnext/hr/doctype/leave_application/test_leave_application.js
|
||||
erpnext/schools/doctype/academic_year/test_academic_year.js
|
||||
erpnext/schools/doctype/academic_term/test_academic_term.js
|
||||
erpnext/schools/doctype/school_settings/test_school_settings.js
|
||||
erpnext/schools/doctype/student_batch_name/test_student_batch_name.js
|
||||
erpnext/schools/doctype/student_category/test_student_category.js
|
||||
erpnext/schools/doctype/room/test_room.js
|
||||
erpnext/schools/doctype/instructor/test_instructor.js
|
||||
erpnext/stock/doctype/warehouse/test_warehouse.js
|
||||
erpnext/manufacturing/doctype/production_order/test_production_order.js #long
|
||||
# erpnext/tests/ui/make_fixtures.js #long
|
||||
# erpnext/setup/doctype/company/tests/test_company.js
|
||||
# erpnext/accounts/doctype/account/test_account.js
|
||||
# erpnext/accounts/doctype/account/test_make_tax_account.js
|
||||
# erpnext/accounts/doctype/pricing_rule/test_pricing_rule.js
|
||||
# erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js
|
||||
# erpnext/accounts/doctype/purchase_taxes_and_charges_template/test_purchase_taxes_and_charges_template.js
|
||||
# erpnext/accounts/doctype/shipping_rule/test_shipping_rule.js
|
||||
# erpnext/crm/doctype/lead/test_lead.js
|
||||
# erpnext/crm/doctype/opportunity/test_opportunity.js
|
||||
# erpnext/setup/doctype/company/tests/test_company_production.js
|
||||
# erpnext/crm/doctype/item/test_item.js
|
||||
# erpnext/selling/doctype/quotation/tests/test_quotation_with_discount_on_grand_total.js
|
||||
# erpnext/selling/doctype/quotation/tests/test_quotation_with_item_wise_discount.js
|
||||
# erpnext/selling/doctype/quotation/tests/test_quotation_with_multi_uom.js
|
||||
# erpnext/selling/doctype/quotation/tests/test_quotation_with_taxes_and_charges.js
|
||||
# erpnext/selling/doctype/quotation/tests/test_quotation_with_shipping_rule.js
|
||||
# erpnext/selling/doctype/quotation/tests/test_quotation.js
|
||||
# erpnext/selling/doctype/sales_order/tests/test_sales_order.js
|
||||
# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multiple_delivery_date.js
|
||||
# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_item_wise_discount.js
|
||||
# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_multi_uom.js
|
||||
# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_discount_on_grand_total.js
|
||||
# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_taxes_and_charges.js
|
||||
# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_shipping_rule.js
|
||||
# erpnext/selling/doctype/sales_order/tests/test_sales_order_with_pricing_rule.js
|
||||
# erpnext/manufacturing/doctype/workstation/test_workstation.js
|
||||
# erpnext/manufacturing/doctype/operation/test_operation.js
|
||||
# erpnext/manufacturing/doctype/bom/test_bom.js
|
||||
# erpnext/projects/doctype/project/project_timesheet.js
|
||||
# erpnext/hr/doctype/holiday_list/test_holiday_list.js
|
||||
# erpnext/hr/doctype/branch/test_branch.js
|
||||
# erpnext/hr/doctype/leave_block_list/test_leave_block_list.js
|
||||
# erpnext/hr/doctype/department/test_department.js
|
||||
# erpnext/hr/doctype/designation/test_designation.js
|
||||
# erpnext/hr/doctype/employment_type/test_employment_type.js
|
||||
# erpnext/hr/doctype/employee/test_employee.js
|
||||
# erpnext/hr/doctype/employee_attendance_tool/test_employee_attendance_tool.js
|
||||
# erpnext/hr/doctype/attendance/test_attendance.js
|
||||
# erpnext/hr/doctype/leave_type/test_leave_type.js
|
||||
# erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.js
|
||||
# erpnext/hr/doctype/leave_allocation/test_leave_allocation.js
|
||||
# erpnext/hr/doctype/leave_application/test_leave_application.js
|
||||
# erpnext/schools/doctype/academic_year/test_academic_year.js
|
||||
# erpnext/schools/doctype/academic_term/test_academic_term.js
|
||||
# erpnext/schools/doctype/school_settings/test_school_settings.js
|
||||
# erpnext/schools/doctype/student_batch_name/test_student_batch_name.js
|
||||
# erpnext/schools/doctype/student_category/test_student_category.js
|
||||
# erpnext/schools/doctype/room/test_room.js
|
||||
# erpnext/schools/doctype/instructor/test_instructor.js
|
||||
# erpnext/stock/doctype/warehouse/test_warehouse.js
|
||||
# erpnext/manufacturing/doctype/production_order/test_production_order.js #long
|
||||
erpnext/selling/page/point_of_sale/tests/test_point_of_sale.js
|
||||
erpnext/accounts/page/pos/test_pos.js
|
||||
erpnext/selling/doctype/product_bundle/test_product_bundle.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user