mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-18 02:55:20 +00:00
[UI Test] Test for Product Bundle added (#10158)
This commit is contained in:
committed by
Makarand Bauskar
parent
4c7709efbd
commit
569011fb21
@@ -0,0 +1,36 @@
|
||||
QUnit.test("test sales order", function(assert) {
|
||||
assert.expect(4);
|
||||
let done = assert.async();
|
||||
frappe.run_serially([
|
||||
() => {
|
||||
return frappe.tests.make('Product Bundle', [
|
||||
{new_item_code: 'Computer'},
|
||||
{items: [
|
||||
[
|
||||
{item_code:'CPU'},
|
||||
{qty:1}
|
||||
],
|
||||
[
|
||||
{item_code:'Screen'},
|
||||
{qty:1}
|
||||
],
|
||||
[
|
||||
{item_code:'Keyboard'},
|
||||
{qty:1}
|
||||
]
|
||||
]},
|
||||
]);
|
||||
},
|
||||
() => cur_frm.save(),
|
||||
() => {
|
||||
// get_item_details
|
||||
assert.ok(cur_frm.doc.items[0].item_code=='CPU', "Item Code correct");
|
||||
assert.ok(cur_frm.doc.items[1].item_code=='Screen', "Item Code correct");
|
||||
assert.ok(cur_frm.doc.items[2].item_code=='Keyboard', "Item Code correct");
|
||||
assert.ok(cur_frm.doc.new_item_code == "Computer", "Parent Item correct");
|
||||
},
|
||||
() => frappe.timeout(0.3),
|
||||
() => done()
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user