mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-30 18:34:48 +00:00
[fix] test
This commit is contained in:
@@ -294,6 +294,8 @@ def get_employee_emails(employee_list):
|
|||||||
'''Returns list of employee emails either based on user_id or company_email'''
|
'''Returns list of employee emails either based on user_id or company_email'''
|
||||||
employee_emails = []
|
employee_emails = []
|
||||||
for employee in employee_list:
|
for employee in employee_list:
|
||||||
|
if not employee:
|
||||||
|
continue
|
||||||
user, email = frappe.db.get_value('Employee', employee, ['user_id', 'company_email'])
|
user, email = frappe.db.get_value('Employee', employee, ['user_id', 'company_email'])
|
||||||
if user or email:
|
if user or email:
|
||||||
employee_emails.append(user or email)
|
employee_emails.append(user or email)
|
||||||
|
|||||||
@@ -11,20 +11,24 @@ QUnit.test("test: Training Event", function (assert) {
|
|||||||
() => frappe.new_doc("Training Event"),
|
() => frappe.new_doc("Training Event"),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
() => frappe.click_link('Edit in full page'),
|
() => frappe.click_link('Edit in full page'),
|
||||||
() => cur_frm.set_value("event_name", "Test Event"),
|
() => cur_frm.set_value("event_name", "Test Event " + frappe.utils.get_random(10)),
|
||||||
() => cur_frm.set_value("start_time", "2017-07-26, 2:00 pm PDT"),
|
() => cur_frm.set_value("start_time", "2017-07-26, 2:00 pm PDT"),
|
||||||
() => cur_frm.set_value("end_time", "2017-07-26, 2:30 pm PDT"),
|
() => cur_frm.set_value("end_time", "2017-07-26, 2:30 pm PDT"),
|
||||||
() => cur_frm.set_value("introduction", "This is a test report"),
|
() => cur_frm.set_value("introduction", "This is a test report"),
|
||||||
() => cur_frm.set_value("location", "Fake office"),
|
() => cur_frm.set_value("location", "Fake office"),
|
||||||
() => cur_frm.set_value("send_email", 0),
|
|
||||||
() => frappe.click_button('Add Row'),
|
() => frappe.click_button('Add Row'),
|
||||||
|
() => frappe.db.get_value('Employee', {'employee_name':'Test Employee 1'}, 'name'),
|
||||||
|
(r) => {
|
||||||
|
console.log(r);
|
||||||
|
return cur_frm.fields_dict.employees.grid.grid_rows[0].doc.employee = r.message.name;
|
||||||
|
},
|
||||||
() => {
|
() => {
|
||||||
cur_frm.fields_dict.employees.grid.grid_rows[0].doc.attendance = "Optional";
|
return cur_frm.fields_dict.employees.grid.grid_rows[0].doc.attendance = "Optional";
|
||||||
},
|
},
|
||||||
() => frappe.click_button('Save'),
|
() => frappe.click_button('Save'),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(2),
|
||||||
() => frappe.click_button('Submit'),
|
() => frappe.click_button('Submit'),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(2),
|
||||||
() => frappe.click_button('Yes'),
|
() => frappe.click_button('Yes'),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
() => {
|
() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user