From: Asko S. <svn...@pl...> - 2012-12-28 22:20:40
|
Repository: plone.act Branch: refs/heads/master Date: 2012-12-28T14:20:24-08:00 Author: Asko Soukka (datakurre) <ask...@ik...> Commit: https://github.com/plone/plone.act/commit/64f15be9af19d59ce0de00c5104c60599d828a0a Merge pull request #33 from plone/workflow add workflow transition keywords; Thanks to @hvelarde Files changed: M CONTRIBUTORS.txt M src/plone/act/keywords.txt diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 092188f..05f747c 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -9,3 +9,5 @@ - Asko Soukka - Timo Stollenwerk - zotya +- Hector Velarde +- Leo Rochael diff --git a/src/plone/act/keywords.txt b/src/plone/act/keywords.txt index 9183a5f..0501d85 100644 --- a/src/plone/act/keywords.txt +++ b/src/plone/act/keywords.txt @@ -151,20 +151,42 @@ Click Rename Action # ---------------------------------------------------------------------------- Publish Object - Click Element xpath=//span[@class='state-private'] - Wait Until Page Contains Publish - Click Element xpath=//span[text()="Publish"] - Wait Until Page Contains Published - -# XXX: We need a generic way to trigger workflow transitions. -#Do Action For -# [arguments] ${transition} -# -# Click Element xpath=//dl[@id='plone-contentmenu-workflow']/dt/a -# Wait Until Page Contains Element xpath=//dd[@class='actionMenuContent'] -# Page should contain Element css=#workflow-transition-${transition} -# Click Element xpath=//span[text()='${transition}'] -# Wait Until Page Contains Published + [Documentation] *DEPRECATED* Use keyword `Workflow Publish` instead. + + Workflow Publish + +# XXX: Check Status Message could be moved to a different section + +Check Status Message + [Arguments] ${message} + + Page Should Contain Element css=dl.portalMessage dt Info + Page Should Contain Element css=dl.portalMessage dd ${message} + +Trigger Workflow Transition + [Arguments] ${transitionId} + + Open Workflow Menu + Click Link workflow-transition-${transitionId} + Check Status Message Item state changed. + +Workflow Submit + Trigger Workflow Transition submit + +Workflow Retract + Trigger Workflow Transition retract + +Workflow Reject + Trigger Workflow Transition reject + +Workflow Publish + Trigger Workflow Transition publish + +Workflow Make Private + Trigger Workflow Transition hide + +Workflow Promote to Draft + Trigger Workflow Transition show # ---------------------------------------------------------------------------- |