42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
-
|
|
In order to test the Idea module in OpenERP,
|
|
-
|
|
I open the idea "Need to put a good idea on OpenERP".
|
|
-
|
|
!workflow {model: idea.idea, action: idea_open, ref: idea_idea_one}
|
|
-
|
|
I check that the idea's state is open.
|
|
-
|
|
!assert {model: idea.idea, id: idea_idea_one}:
|
|
- state == 'open'
|
|
-
|
|
I give vote the idea as "Very Good" and put comment "It will good for openERP feature".
|
|
-
|
|
!python {model: idea.post.vote}: |
|
|
new_id = self.create(cr, uid, {'vote': "100", 'note': 'It will good for openERP feature'}, {"active_ids": [ref("idea_idea_one")]})
|
|
self.do_vote(cr, uid, [new_id], {'active_ids': [ref('idea_idea_one')]})
|
|
-
|
|
I check the Average score.
|
|
-
|
|
!assert {model: idea.idea, id: idea_idea_one}:
|
|
vote_avg: 100
|
|
-
|
|
I Accept the idea of "Need to put a good idea on OpenERP".
|
|
-
|
|
!workflow {model: idea.idea, action: idea_close, ref: idea_idea_one}
|
|
-
|
|
I check that the idea's state is now Accepted.
|
|
-
|
|
!assert {model: idea.idea, id: idea_idea_one}:
|
|
- state == 'close'
|
|
-
|
|
I Refuse the idea of "Technical presentation for 1 hours in every day".
|
|
-
|
|
!workflow {model: idea.idea, action: idea_open, ref: idea_idea_two}
|
|
-
|
|
!workflow {model: idea.idea, action: idea_cancel, ref: idea_idea_two}
|
|
-
|
|
I check that the idea's state is now Refused.
|
|
-
|
|
!assert {model: idea.idea, id: idea_idea_two}:
|
|
- state == 'cancel' |