[UI Test] UI test added for Pricing Rule (#10237)
* [UI Test] UI test added for Pricing Rule * [mod]minor chages in pricing rule test * [fix] codacy fixed
This commit is contained in:
parent
f9e4893d9d
commit
ed0b107a9f
28
erpnext/accounts/doctype/pricing_rule/test_pricing_rule.js
Normal file
28
erpnext/accounts/doctype/pricing_rule/test_pricing_rule.js
Normal file
@ -0,0 +1,28 @@
|
||||
QUnit.module('Pricing Rule"');
|
||||
|
||||
QUnit.test("test pricing rule", function(assert) {
|
||||
assert.expect(2);
|
||||
let done = assert.async();
|
||||
frappe.run_serially([
|
||||
() => {
|
||||
return frappe.tests.make("Pricing Rule", [
|
||||
{title: 'Test Pricing Rule'},
|
||||
{item_code:'Test Product 2'},
|
||||
{selling:1},
|
||||
{applicable_for:'Customer'},
|
||||
{customer:'Test Customer 3'},
|
||||
{min_qty:1},
|
||||
{max_qty:20},
|
||||
{valid_upto: frappe.datetime.add_days(frappe.defaults.get_default("year_end_date"), 1)},
|
||||
{discount_percentage:10},
|
||||
{for_price_list:'Standard Selling'}
|
||||
]);
|
||||
},
|
||||
() => {
|
||||
assert.ok(cur_frm.doc.item_code=='Test Product 2');
|
||||
assert.ok(cur_frm.doc.customer=='Test Customer 3');
|
||||
},
|
||||
() => done()
|
||||
]);
|
||||
});
|
||||
|
@ -2,6 +2,7 @@ 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/shipping_rule/test_shipping_rule.js
|
||||
erpnext/crm/doctype/lead/test_lead.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user