[UI Test] Test added for Shipping Rule (#10229)

* [UI Test] Test added for Shipping Rule

* [fix]Travis Failed
This commit is contained in:
Vishal Dhayagude 2017-08-02 17:16:46 +05:30 committed by Rushabh Mehta
parent f1f1b60a62
commit f9e4893d9d
3 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,35 @@
QUnit.module('Shipping Rule');
QUnit.test("test Shipping Rule", function(assert) {
assert.expect(1);
let done = assert.async();
frappe.run_serially([
() => {
return frappe.tests.make("Shipping Rule", [
{label: "Next Day Shipping"},
{conditions:[
[
{from_value:1},
{to_value:200},
{shipping_amount:100}
],
[
{from_value:201},
{to_value:2000},
{shipping_amount:50}
],
]},
{countries:[
[
{country:'India'}
]
]},
{account:'Accounts Payable - '+frappe.get_abbr(frappe.defaults.get_default("Company"))},
{cost_center:'Main - '+frappe.get_abbr(frappe.defaults.get_default("Company"))}
]);
},
() => {assert.ok(cur_frm.doc.name=='Next Day Shipping');},
() => done()
]);
});

View File

@ -7,6 +7,7 @@ QUnit.test('test student applicant', function(assert){
let testing_status;
frappe.run_serially([
() => frappe.set_route('Form', 'School House/New School House'),
() => frappe.timeout(0.5),
() => cur_frm.doc.house_name = 'Test_house',
() => cur_frm.save(),
() => frappe.set_route('List', 'Student Applicant'),

View File

@ -3,6 +3,7 @@ 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/sales_taxes_and_charges_template/test_sales_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/selling/doctype/quotation/test_quotation.js