[UI Test] Create tax account in Charts of account (#10105)
* [new]tax creation added * [new]path added test.txt
This commit is contained in:
parent
fbec103ae7
commit
c67bf5026e
46
erpnext/accounts/doctype/account/test_make_tax_account.js
Normal file
46
erpnext/accounts/doctype/account/test_make_tax_account.js
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
QUnit.module('accounts');
|
||||||
|
QUnit.test("test account", assert => {
|
||||||
|
assert.expect(3);
|
||||||
|
let done = assert.async();
|
||||||
|
frappe.run_serially([
|
||||||
|
() => frappe.set_route('Tree', 'Account'),
|
||||||
|
() => frappe.click_button('Expand All'),
|
||||||
|
() => frappe.click_link('Duties and Taxes - '+ frappe.get_abbr(frappe.defaults.get_default("Company"))),
|
||||||
|
() => {
|
||||||
|
if($('a:contains("CGST"):visible').length == 0){
|
||||||
|
return frappe.map_tax.make('CGST', 9);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
if($('a:contains("SGST"):visible').length == 0){
|
||||||
|
return frappe.map_tax.make('SGST', 9);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
if($('a:contains("IGST"):visible').length == 0){
|
||||||
|
return frappe.map_tax.make('IGST', 18);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
assert.ok($('a:contains("CGST"):visible').length!=0, "CGST Checked");
|
||||||
|
assert.ok($('a:contains("SGST"):visible').length!=0, "SGST Checked");
|
||||||
|
assert.ok($('a:contains("IGST"):visible').length!=0, "IGST Checked");
|
||||||
|
},
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
frappe.map_tax = {
|
||||||
|
make:function(text,rate){
|
||||||
|
return frappe.run_serially([
|
||||||
|
() => frappe.click_button('Add Child'),
|
||||||
|
() => frappe.timeout(0.2),
|
||||||
|
() => cur_dialog.set_value('account_name',text),
|
||||||
|
() => cur_dialog.set_value('account_type','Tax'),
|
||||||
|
() => cur_dialog.set_value('tax_rate',rate),
|
||||||
|
() => cur_dialog.set_value('account_currency','INR'),
|
||||||
|
() => frappe.click_button('Create New'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
};
|
@ -1,6 +1,7 @@
|
|||||||
erpnext/tests/ui/make_fixtures.js #long
|
erpnext/tests/ui/make_fixtures.js #long
|
||||||
erpnext/setup/doctype/company/test_company.js
|
erpnext/setup/doctype/company/test_company.js
|
||||||
erpnext/accounts/doctype/account/test_account.js
|
erpnext/accounts/doctype/account/test_account.js
|
||||||
|
erpnext/accounts/doctype/account/test_make_tax_account.js
|
||||||
erpnext/crm/doctype/lead/test_lead.js
|
erpnext/crm/doctype/lead/test_lead.js
|
||||||
erpnext/crm/doctype/opportunity/test_opportunity.js
|
erpnext/crm/doctype/opportunity/test_opportunity.js
|
||||||
erpnext/selling/doctype/quotation/test_quotation.js
|
erpnext/selling/doctype/quotation/test_quotation.js
|
||||||
|
Loading…
Reference in New Issue
Block a user