Skip to content

Commit

Permalink
Fix UI tests (#11309)
Browse files Browse the repository at this point in the history
* decrease the timeout

* delete the duplicate test
  • Loading branch information
Manas Solanki authored and nabinhait committed Oct 25, 2017
1 parent 5c5a853 commit a5eee46
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 47 deletions.
8 changes: 4 additions & 4 deletions erpnext/hr/doctype/offer_letter/test_offer_letter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ QUnit.test("Test: Offer Letter [HR]", function (assert) {
]},
]);
},
() => frappe.timeout(12),
() => frappe.timeout(10),
() => frappe.click_button('Submit'),
() => frappe.timeout(2),
() => frappe.click_button('Yes'),
() => frappe.timeout(8),
() => frappe.timeout(5),
// To check if the fields are correctly set
() => {
// To check if the fields are correctly set
assert.ok(cur_frm.get_field('status').value=='Accepted',
'Status of job offer is correct');
assert.ok(cur_frm.get_field('designation').value=='Software Developer',
Expand All @@ -45,7 +45,7 @@ QUnit.test("Test: Offer Letter [HR]", function (assert) {
() => {
assert.ok(cur_list.data[0].docstatus==1,'Offer Letter Submitted successfully');
},
() => frappe.timeout(4),
() => frappe.timeout(2),
() => done()
]);
});
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
QUnit.module('hr');

QUnit.test("Test: Training Event [HR]", function (assert) {
assert.expect(4);
assert.expect(5);
let done = assert.async();
let employee_name;

Expand All @@ -21,7 +21,8 @@ QUnit.test("Test: Training Event [HR]", function (assert) {
{ employees: [
[
{employee: employee_name},
{employee_name: 'Test Employee 1'}
{employee_name: 'Test Employee 1'},
{attendance: 'Optional'}
]
]},
]);
Expand All @@ -41,6 +42,9 @@ QUnit.test("Test: Training Event [HR]", function (assert) {

assert.ok(cur_frm.doc.employees[0].employee_name=='Test Employee 1',
'Attendee Employee is correctly set');

assert.ok(cur_frm.doc.employees[0].attendance=='Optional',
'Attendance is correctly set');
},

() => frappe.set_route('List','Training Event','List'),
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion erpnext/tests/ui/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ erpnext/hr/doctype/appraisal/test_appraisal.js
erpnext/hr/doctype/expense_claim_type/test_expense_claim_type.js
erpnext/hr/doctype/expense_claim/test_expense_claim.js
erpnext/hr/doctype/training_event/tests/test_training_event.js
erpnext/hr/doctype/training_event/tests/test_training_event_attendance.js
erpnext/hr/doctype/training_result_employee/test_training_result.js
erpnext/hr/doctype/training_feedback/test_training_feedback.js
erpnext/hr/doctype/loan_type/test_loan_type.js
Expand Down

0 comments on commit a5eee46

Please sign in to comment.