[UI Test] Test for Product Bundle added (#10158)
This commit is contained in:
parent
4c7709efbd
commit
569011fb21
@ -65,6 +65,13 @@ QUnit.test("test: item", function (assert) {
|
||||
{item_group: "Products"}
|
||||
]
|
||||
),
|
||||
() => frappe.tests.make(
|
||||
"Item", [
|
||||
{item_code: "Computer"},
|
||||
{item_group: "Products"},
|
||||
{is_stock_item: 0},
|
||||
]
|
||||
),
|
||||
|
||||
// Create a scrap item
|
||||
() => frappe.tests.make(
|
||||
|
@ -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()
|
||||
]);
|
||||
});
|
||||
|
@ -30,3 +30,4 @@ erpnext/schools/doctype/student_batch_name/test_student_batch_name.js
|
||||
erpnext/schools/doctype/student_category/test_student_category.js
|
||||
erpnext/schools/doctype/room/test_room.js
|
||||
erpnext/schools/doctype/instructor/test_instructor.js
|
||||
erpnext/selling/doctype/product_bundle/test_product_bundle.js
|
Loading…
x
Reference in New Issue
Block a user