From 4b38a40c3de605e0da20c35bbce89eef4604099e Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Fri, 23 Sep 2011 17:57:33 +0530 Subject: [PATCH] [IMP] hr_timesheet_sheet: Improved yaml, added test cases for some methods. bzr revid: uco@tinyerp.com-20110923122733-rgjt5coflc4xj7gc --- .../test/test_hr_timesheet_sheet.yml | 30 ++++++++++++++----- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml index 1808c325a07..ccce1d44425 100644 --- a/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml +++ b/addons/hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml @@ -71,13 +71,30 @@ user_id: base.user_demo employee_id: 'hr_employee_employee0' - - Now , at the time of login, I create Attendances and perform "Sign In" action. + Now, at the time of login, I create Attendances and perform "Sign In" action. - - !record {model: hr.attendance, id: hr_attendance_0}: - action: sign_in - employee_id: 'hr_employee_employee0' - name: !eval time.strftime('%Y-%m-%d')+' '+'%s:%s:%s' %(max(0,datetime.now().hour-1),max(0,datetime.now().minute-1),max(0,datetime.now().second-1)) - + !python {model: hr_timesheet_sheet.sheet}: + self.sign_in(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], None) +- + I want to check attendance and work of yesterday. I click on <- button. +- + !python {model: hr_timesheet_sheet.sheet}: | + self.date_previous(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], None) +- + Then I click on "Today" button to fill today's timesheet. +- + !python {model: hr_timesheet_sheet.sheet}: | + self.date_today(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], None) +- + I want to go to a particular date and see attendance then I select the date and click on "Go to:" button. +- + !python {model: hr_timesheet_sheet.sheet}: | + self.button_dummy(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], None) +- + I can also move to next day by clicking on -> button. +- + !python {model: hr_timesheet_sheet.sheet}: | + self.date_next(cr, uid, [ref('hr_timesheet_sheet_sheet_deddk0')], None) - At the time of logout, I create attendance and perform "Sign Out". - @@ -88,7 +105,6 @@ - I create Timesheet Entry for time spend on today work. - - !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}: timesheet_ids: