From df0dd8be5f66ed87da1e86ec640eeab05561e55f Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Fri, 29 Dec 2017 14:04:46 +0530 Subject: [PATCH] Travis fix for client side tests (#12224) * salary slip test fix * attendance tool test fix * timeout after routing --- .../student_attendance_tool/test_student_attendance_tool.js | 2 +- erpnext/hr/doctype/salary_slip/test_salary_slip.js | 2 +- .../doctype/stock_reconciliation/test_stock_reconciliation.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js b/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js index 19b32a99ec..cea0761ae8 100644 --- a/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js +++ b/erpnext/education/doctype/student_attendance_tool/test_student_attendance_tool.js @@ -77,7 +77,7 @@ QUnit.test('Test: Student Attendace Tool', function(assert){ () => frappe.set_route('List', 'Student Attendance/List'), () => frappe.timeout(1), () => { - assert.equal(($('div.list-item').size() - 1), count, "Attendance list created"); + assert.equal(cur_list.data.length, count, "Attendance list created"); }, () => done() diff --git a/erpnext/hr/doctype/salary_slip/test_salary_slip.js b/erpnext/hr/doctype/salary_slip/test_salary_slip.js index 43cc27db9f..06a1c7d72d 100644 --- a/erpnext/hr/doctype/salary_slip/test_salary_slip.js +++ b/erpnext/hr/doctype/salary_slip/test_salary_slip.js @@ -46,7 +46,7 @@ QUnit.test("test salary slip", function(assert) { () => frappe.timeout(5), () => frappe.set_route('List', 'Salary Slip', 'List'), () => frappe.timeout(2), - () => {$('.list-select-all').click();}, + () => {$('.list-row-checkbox').click();}, () => frappe.timeout(2), () => frappe.click_button('Delete'), () => frappe.click_button('Yes'), diff --git a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js index d4d1a0a52e..80001d63fd 100644 --- a/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js +++ b/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.js @@ -5,6 +5,7 @@ QUnit.test("test Stock Reconciliation", function(assert) { let done = assert.async(); frappe.run_serially([ () => frappe.set_route('List', 'Stock Reconciliation'), + () => frappe.timeout(1), () => frappe.click_button('New'), () => cur_frm.set_value('company','For Testing'), () => frappe.click_button('Items'),