brotherton-erpnext/erpnext/tests/ui/test_sellling.js
Rushabh Mehta 43ef4e9047 Added first UI tests (#9532)
* [wip]

* [tests] wip

* [ui-tests] first-cut

* [minor] remove old tests
2017-07-03 11:53:07 +05:30

30 lines
629 B
JavaScript

QUnit.module('sales');
QUnit.test("test quotation", function(assert) {
assert.expect(2);
let done = assert.async();
frappe.run_serially([
() => frappe.tests.setup_doctype('Customer'),
() => frappe.tests.setup_doctype('Item'),
() => {
return frappe.tests.make('Quotation', [
{customer: 'Test Customer 1'},
{items: [
[
{'item_code': 'Test Product 1'},
{'qty': 5}
]
]}
]);
},
() => {
// get_item_details
assert.ok(cur_frm.doc.items[0].item_name=='Test Product 1');
// calculate_taxes_and_totals
assert.ok(cur_frm.doc.grand_total==500);
},
() => done()
]);
});