From 8108d522e3eb6ccf80db6daaa4cf7a98f7414077 Mon Sep 17 00:00:00 2001 From: "Hemendra Paregi (Open ERP)" Date: Mon, 28 Nov 2011 15:49:52 +0530 Subject: [PATCH] [IMP]project_gtd: improvement in yml of project_gtd bzr revid: hpa@tinyerp.com-20111128101952-99qis8rd0l9kjkp4 --- addons/project_gtd/test/task_timebox.yml | 29 +++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/addons/project_gtd/test/task_timebox.yml b/addons/project_gtd/test/task_timebox.yml index 7379f5857cf..84de7bda953 100644 --- a/addons/project_gtd/test/task_timebox.yml +++ b/addons/project_gtd/test/task_timebox.yml @@ -1,42 +1,45 @@ - - In order to set Daily tasks into Weekly Timebox, I create plan for that + In order to test the process of Timebox in Project Management module, + I set my task from Daily to Weekly Timebox through Plannify Timebox - !record {model: project.timebox.fill.plan, id: plan_id}: task_ids: [project.project_task_10] timebox_id: timebox_daily timebox_to_id: timebox_weekly - - I run plan to set Daily tasks into Weekly Timebox + I set the task from Daily Timebox to Weekly Timebox - !python {model: project.timebox.fill.plan}: | self.process(cr, uid, [ref("plan_id")]) - - I check Weekly Timebox of task after set Timebox + I check task is set to Weekly Timebox - !assert {model: project.task, id: project.project_task_10, string: Task should be set to weekly timebox}: - timebox_id.id == ref("timebox_weekly") - - I Empty the Daily Timebox + I Empty the Weekly Timebox - !python {model: project.timebox.empty}: | self._empty(cr, uid, {"active_model": "project.gtd.timebox", - "active_ids":[ref("timebox_daily")], - "active_id": ref("timebox_daily"), + "active_ids":[ref("timebox_weekly")], + "active_id": ref("timebox_weekly"), }) - - I check task 'Develop time management module' is no more in Daily Timebox + I check task 'Develop Module in Sale Management' is no more in Weekly Timebox - - !assert {model: project.task, id: project.project_task_10 , string: Task is not in Daily Timebox}: - - timebox_id.id != ref("timebox_daily") + !assert {model: project.task, id: project.project_task_10 , string: Task is not in Weekly Timebox }: + - timebox_id.id != ref("timebox_weekly") - I set Previous Timebox on task - !python {model: project.task}: | - self.prev_timebox(cr, uid, [ref("project.project_task_10")], - {'active_ids': [ref("project.project_task_1")],}) + previous_timebox = self.prev_timebox(cr, uid, [ref("project.project_task_10")], + {'active_ids': [ref("project_gtd.menu_open_gtd_timebox_tree")],}) + assert previous_timebox == True, "I set Previous Timebox on task" - I set Next Timebox on task - !python {model: project.task}: | - self.next_timebox(cr, uid, [ref("project.project_task_10")], - {'active_ids': [ref("project.project_task_1")],}) + nexts_timebox = self.next_timebox(cr, uid, [ref("project.project_task_10")], + {'active_ids': [ref("project_gtd.menu_open_gtd_timebox_tree")],}) + assert nexts_timebox == True, "I set Previous Timebox on task" \ No newline at end of file