diff --git a/erpnext/selling/page/point_of_sale/test_point_of_sale.js b/erpnext/selling/page/point_of_sale/test_point_of_sale.js index a178e5c2c25..d5053b5cd18 100644 --- a/erpnext/selling/page/point_of_sale/test_point_of_sale.js +++ b/erpnext/selling/page/point_of_sale/test_point_of_sale.js @@ -1,3 +1,21 @@ +QUnit.test("test:POS Settings", function(assert) { + assert.expect(1); + let done = assert.async(); + + frappe.run_serially([ + () => frappe.set_route('Form', 'POS Settings'), + () => cur_frm.set_value('is_online', 1), + () => frappe.timeout(0.2), + () => cur_frm.save(), + () => frappe.timeout(1), + () => frappe.ui.toolbar.clear_cache(), + () => frappe.timeout(2), + () => assert.ok(cur_frm.doc.is_online==1, "Enabled online"), + () => frappe.timeout(2), + () => done() + ]); +}); + QUnit.test("test:Point of Sales", function(assert) { assert.expect(1); let done = assert.async(); @@ -5,13 +23,13 @@ QUnit.test("test:Point of Sales", function(assert) { frappe.run_serially([ () => frappe.set_route('point-of-sale'), () => frappe.timeout(2), - () => frappe.set_control('customer', 'Test Customer'), + () => frappe.set_control('customer', 'Test Customer 1'), () => frappe.timeout(0.2), - () => cur_frm.set_value('customer', 'Test Customer'), + () => cur_frm.set_value('customer', 'Test Customer 1'), () => frappe.timeout(2), - () => frappe.click_link('Test FG Item 2'), + () => frappe.click_link('Test Product 2'), () => frappe.timeout(0.2), - () => frappe.click_element(`.cart-items [title="_Test FG Item 2"]`), + () => frappe.click_element(`.cart-items [title="Test Product 2"]`), () => frappe.timeout(0.2), () => frappe.click_element(`.number-pad [data-value="Rate"]`), () => frappe.timeout(0.2),