From 1387699afc0c5c0b7cfd7dd86b09d97c6d2cc314 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Wed, 21 Sep 2011 14:49:59 +0530 Subject: [PATCH] [IMP] hr_evaluation: Imrpoved yaml. Added some tests for remaining methods. bzr revid: uco@tinyerp.com-20110921091959-oree9sk80ck87x6r --- .../hr_evaluation/test/test_hr_evaluation.yml | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/addons/hr_evaluation/test/test_hr_evaluation.yml b/addons/hr_evaluation/test/test_hr_evaluation.yml index a1c2f92ad1d..926ad5714c6 100644 --- a/addons/hr_evaluation/test/test_hr_evaluation.yml +++ b/addons/hr_evaluation/test/test_hr_evaluation.yml @@ -96,7 +96,11 @@ name: Final Interview with manager sequence: 2 survey_id: 'survey_0' - +- + I assign the evaluation plan to the employee "Mark Johnson". +- + !python {model: hr.employee}: | + res = self.onchange_evaluation_plan_id(cr, uid, [ref('hr_employee_employee0')], ref('hr_evaluation_plan_managersplan0'), False, None) - I create an Evaluation for employee under "Manager Evaluation Plan". - @@ -106,18 +110,35 @@ plan_id: 'hr_evaluation_plan_managersplan0' progress: 0.0 state: draft +- + I change the employee on Evaluation. +- + !python {model: hr_evaluation.evaluation}: | + self.onchange_employee_id(cr, uid, [ref('hr_evaluation_evaluation_0')], ref('hr_employee_employee0'), None) - I start the evaluation process by click on "Start Evaluation" button. - !python {model: hr_evaluation.evaluation}: | self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')]) - +- + I find a mistake on evaluation form. So I cancel the evaluation and again start it. +- + !python {model: hr_evaluation.evaluation}: | + self.button_cancel(cr, uid, [ref('hr_evaluation_evaluation_0')]) + self.button_draft(cr, uid, [ref('hr_evaluation_evaluation_0')]) + self.button_plan_in_progress(cr, uid, [ref('hr_evaluation_evaluation_0')]) - I close this survey request by giving answer of survey question. - !python {model: hr_evaluation.evaluation}: | evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0')) self.pool.get('hr.evaluation.interview').survey_req_done(cr, uid, [r.id for r in evaluation.survey_request_ids]) +- + I print the survey. +- + !python {model: hr_evaluation.evaluation}: | + evaluation = self.browse(cr, uid, ref('hr_evaluation_evaluation_0')) + self.pool.get('hr.evaluation.interview').action_print_survey(cr, uid, [r.id for r in evaluation.survey_request_ids]) - I click on "Final Validation" button to finalise evaluation. -