Test cases
This commit is contained in:
parent
7e752c4ebf
commit
3e43927767
@ -507,8 +507,10 @@ class POSCart {
|
||||
df: {
|
||||
fieldtype: 'Link',
|
||||
label: 'Customer',
|
||||
fieldname: 'customer',
|
||||
options: 'Customer',
|
||||
reqd: 1,
|
||||
default: this.frm.doc.customer,
|
||||
onchange: () => {
|
||||
this.events.on_customer_change(this.customer_field.get_value());
|
||||
}
|
||||
|
38
erpnext/selling/page/point_of_sale/test_point_of_sale.js
Normal file
38
erpnext/selling/page/point_of_sale/test_point_of_sale.js
Normal file
@ -0,0 +1,38 @@
|
||||
QUnit.test("test:Point of Sales", function(assert) {
|
||||
assert.expect(1);
|
||||
let done = assert.async();
|
||||
|
||||
frappe.run_serially([
|
||||
() => frappe.set_route('point-of-sale'),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.set_control('customer', 'Test Customer'),
|
||||
() => frappe.timeout(0.2),
|
||||
() => cur_frm.set_value('customer', 'Test Customer'),
|
||||
() => frappe.timeout(2),
|
||||
() => frappe.click_link('Test FG Item 2'),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.cart-items [title="_Test FG Item 2"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.number-pad [data-value="Rate"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.number-pad [data-value="2"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.number-pad [data-value="5"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.number-pad [data-value="0"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.number-pad [data-value="Pay"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.frappe-control [data-value="4"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.frappe-control [data-value="5"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_element(`.frappe-control [data-value="0"]`),
|
||||
() => frappe.timeout(0.2),
|
||||
() => frappe.click_button('Submit'),
|
||||
() => frappe.click_button('Yes'),
|
||||
() => frappe.timeout(5),
|
||||
() => assert.ok(cur_frm.doc.docstatus==1, "Sales invoice created successfully"),
|
||||
() => done()
|
||||
]);
|
||||
});
|
@ -50,6 +50,7 @@ erpnext/schools/doctype/room/test_room.js
|
||||
erpnext/schools/doctype/instructor/test_instructor.js
|
||||
erpnext/stock/doctype/warehouse/test_warehouse.js
|
||||
erpnext/manufacturing/doctype/production_order/test_production_order.js #long
|
||||
erpnext/selling/page/point_of_sale/test_point_of_sale.js
|
||||
erpnext/accounts/page/pos/test_pos.js
|
||||
erpnext/selling/doctype/product_bundle/test_product_bundle.js
|
||||
erpnext/stock/doctype/delivery_note/test_delivery_note.js
|
||||
|
Loading…
x
Reference in New Issue
Block a user