From b528411ed176cd899116f3e81378c04138ef5f23 Mon Sep 17 00:00:00 2001 From: Vishal Dhayagude Date: Thu, 27 Jul 2017 12:15:06 +0530 Subject: [PATCH] [ui test]sales and taxes charges template (#10116) --- .../test_sales_taxes_and_charges_template.js | 26 +++++++++++++++++++ erpnext/tests/ui/tests.txt | 1 + 2 files changed, 27 insertions(+) create mode 100644 erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js diff --git a/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js b/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js new file mode 100644 index 0000000000..2667ee62d7 --- /dev/null +++ b/erpnext/accounts/doctype/sales_taxes_and_charges_template/test_sales_taxes_and_charges_template.js @@ -0,0 +1,26 @@ +QUnit.module('Sales Taxes and Charges Template'); + +QUnit.test("test sales taxes and charges template", function(assert) { + assert.expect(1); + let done = assert.async(); + frappe.run_serially([ + () => { + return frappe.tests.make('Sales Taxes and Charges Template', [ + {title: "TEST In State GST"}, + {taxes:[ + [ + {charge_type:"On Net Total"}, + {account_head:"CGST - "+frappe.get_abbr(frappe.defaults.get_default("Company")) } + ], + [ + {charge_type:"On Net Total"}, + {account_head:"SGST - "+frappe.get_abbr(frappe.defaults.get_default("Company")) } + ] + ]} + ]); + }, + () => {assert.ok(cur_frm.doc.title=='TEST In State GST');}, + () => done() + ]); +}); + diff --git a/erpnext/tests/ui/tests.txt b/erpnext/tests/ui/tests.txt index cc2c643aa9..90b8e585fa 100644 --- a/erpnext/tests/ui/tests.txt +++ b/erpnext/tests/ui/tests.txt @@ -2,6 +2,7 @@ erpnext/tests/ui/make_fixtures.js #long erpnext/setup/doctype/company/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/crm/doctype/lead/test_lead.js erpnext/crm/doctype/opportunity/test_opportunity.js erpnext/selling/doctype/quotation/test_quotation.js