approbationReviewOK
setTimeout 120000
open restAPI/systemLog?token=dolog&level=WARN&message=----- Selenium approbationReviewOK
open logout
open nxpath/default/default-domain/workspaces/testWorkspace1/testFolder1/testNote1@view_documents
type username jsmith
type password jsmith1
clickAndWait Submit
verifyTextPresent jsmith
clickAndWait link=Workflow
click //input[@id='startWorkflow:workflowDefinitionId:1']
click //input[@id='startWorkflow:lifeCycleDestinationStateTransition:0']
clickAndWait //input[@value='Start']
verifyTextPresent Approval workflow
verifyElementPresent link=Edit
verifyElementNotPresent //input[@value='Start the workflow']
typeKeys //input[@name='addReviewers:nxl_add_workflow_task:nxw_actors_suggest'] jsmith
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox').style.display != 'none' 10000
verifyText //*[@id='addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox:suggest']/x:tbody/x:tr[1]/x:td[2] John Smith
click //*[@id='addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox:suggest']/x:tbody/x:tr[1]/x:td[2]
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_list:0:nxw_actors_listItem') != null 10000
type //input[@name='addReviewers:nxl_add_workflow_task:nxw_actors_suggest']
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox').style.display == 'none' 10000
select //select[@id='addReviewers:nxl_add_workflow_task:nxw_directive'] label=Check
type //textarea[@id='addReviewers:nxl_add_workflow_task:nxw_jbpm_comment'] Approval comment for jsmith
clickAndWait //input[@value='Add']
verifyTextPresent Selected participant(s) successfully added to the workflow
verifyTextPresent Approval comment for jsmith
typeKeys //input[@name='addReviewers:nxl_add_workflow_task:nxw_actors_suggest'] jdoe
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox').style.display != 'none' 10000
verifyText //*[@id='addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox:suggest']/x:tbody/x:tr[1]/x:td[2] John Doe
click //*[@id='addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox:suggest']/x:tbody/x:tr[1]/x:td[2]
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_list:0:nxw_actors_listItem') != null 10000
type //input[@name='addReviewers:nxl_add_workflow_task:nxw_actors_suggest']
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox').style.display == 'none' 10000
select //select[@id='addReviewers:nxl_add_workflow_task:nxw_directive'] label=Diffusion
type //textarea[@id='addReviewers:nxl_add_workflow_task:nxw_jbpm_comment'] Approval comment for jdoe
clickAndWait //input[@value='Add']
verifyTextPresent Selected participant(s) successfully added to the workflow
verifyTextPresent Approval comment for jdoe
verifyElementNotPresent link=Approve
typeKeys //input[@name='addReviewers:nxl_add_workflow_task:nxw_actors_suggest'] bre
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox').style.display != 'none' 10000
verifyText //*[@id='addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox:suggest']/x:tbody/x:tr[1]/x:td[2] Bree Van de Kaamp
click //*[@id='addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox:suggest']/x:tbody/x:tr[1]/x:td[2]
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_list:0:nxw_actors_listItem') != null 10000
type //input[@name='addReviewers:nxl_add_workflow_task:nxw_actors_suggest']
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById('addReviewers:nxl_add_workflow_task:nxw_actors_suggestionBox').style.display == 'none' 10000
select //select[@id='addReviewers:nxl_add_workflow_task:nxw_directive'] label=Diffusion
type //textarea[@id='addReviewers:nxl_add_workflow_task:nxw_jbpm_comment'] Approval comment for bree
clickAndWait //input[@value='Add']
verifyTextPresent Selected participant(s) successfully added to the workflow
verifyTextPresent Approval comment for bree
verifyElementNotPresent link=Approve
verifyElementNotPresent link=Reject
verifyElementPresent //input[@value='Start the workflow']
clickAndWait //input[@value='Start the workflow']
verifyElementPresent link=Approve
verifyElementPresent link=Reject
verifyElementPresent //a[@id='reviewTasksTable:nxl_virtualTasks_listing:nxw_delete_virtualTask:removeParticipant_0']
type //textarea[@id="reviewTasksTable:taskActionComment"] Ok for me
clickAndWait link=Approve
verifyElementPresent link=Approve
verifyElementPresent link=Reject
clickAndWait link=Log out
type username jdoe
type password jdoe1
clickAndWait Submit
verifyTextPresent jdoe
clickAndWait link=Home
waitForOpensocialGadgetsToLoad nxDocumentListData 60000
selectOpenSocialGadgetFrame tasks
clickAndWait link=testNote1
clickAndWait link=Approve
verifyElementNotPresent link=Approve
verifyElementNotPresent link=Reject
clickAndWait link=Log out
type username bree
type password bree1
clickAndWait Submit
clickAndWait link=Home
waitForOpensocialGadgetsToLoad nxDocumentListData 60000
selectOpenSocialGadgetFrame tasks
clickAndWait link=testNote1
type //textarea[@id="reviewTasksTable:taskActionComment"] not ok from bree
verifyElementPresent link=Reject
clickAndWait link=Reject
verifyTextNotPresent Select reviewers
verifyElementNotPresent link=Approve
verifyElementNotPresent link=Reject
clickAndWait link=Log out
type username jdoe
type password jdoe1
clickAndWait Submit
verifyTextPresent jdoe
clickAndWait link=Home
waitForOpensocialGadgetsToLoad nxDocumentListData 60000
selectOpenSocialGadgetFrame tasks
clickAndWait link=testNote1
verifyElementPresent link=Approve
verifyElementNotPresent link=Reject
clickAndWait link=Approve
clickAndWait link=Log out
type username bree
type password bree1
clickAndWait Submit
verifyTextPresent bree
clickAndWait link=Home
waitForOpensocialGadgetsToLoad nxDocumentListData 60000
selectOpenSocialGadgetFrame lastdocuments
clickAndWait link=testNote1
verifyTextNotPresent Project
verifyTextPresent Approved
clickAndWait link=Workflow
verifyTextPresent No workflows are currently active for this document. You don't have the rights to start a workflow.
clickAndWait link=History
assertTextPresent not ok from bree
assertTextPresent Workflow task rejected
assertTextPresent Workflow task completed
clickAndWait link=Log out