Test_SNF_ECMS_79_ApproveContentPublishing_ecmdemo
open /portal/public/default/
windowMaximize
clickAndWait link=Visit the Acme Website
echo -- Log in
click link=Login
type username root
type password gtn
clickAndWait link=Sign in
echo --  Go to Site Admin
clickAndWait //a[contains(@href, '/portal/private/acme/wcmAdmin')]
waitForElementPresent //div[@id='UIECMAdminPortlet']/div[1]/div[1]/div[2]/div/div[2]/div[1]/div/div/div/div[2]
click //div[@id='UIECMAdminPortlet']/div[1]/div[1]/div[2]/div/div[2]/div[1]/div/div/div/div[2]
waitForElementPresent link=Manage Drives
click link=Manage Drives
waitForElementPresent link=Add Drive
click link=Add Drive
waitForElementPresent name
type name Workflow
echo -- Add path for drive
select workspace label=collaboration
click //option[@value='collaboration']
waitForElementPresent //img[@title='Add Path']
click //img[@title='Add Path']
waitForElementPresent //div[@id='UISelectPathPanel']/table/tbody/tr[4]/td[2]/a/div
click //div[@id='UISelectPathPanel']/table/tbody/tr[4]/td[2]/a/div
echo -- Add permission for drive
click //img[@title='Add Permission']
waitForElementPresent //img[@title='Set any permission']
click //img[@title='Set any permission']
waitForElementPresent //form[@id='UIDriveForm']/div[3]/div/div/div/div/div/div[8]/table/tbody/tr/td[2]//input[@class='checkbox']
click //form[@id='UIDriveForm']/div[3]/div/div/div/div/div/div[8]/table/tbody/tr/td[2]//input[@class='checkbox']
addSelection allowCreateFolders label=Unstructured folder
waitForElementPresent //div[2]/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click //div[2]/div/div/div/div/div/div/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
click admin-view
click icon-view
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Logout
clickAndWait link=Logout
pause 3000
echo - Create content publishing by normal user
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username mary
type password gtn
clickAndWait link=Sign in
echo -- Site Explorer
clickAndWait //a[@href='/portal/private/acme/siteExplorer']
waitForElementPresent //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
click //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
waitForElementPresent link=Workflow
click link=Workflow
waitForElementPresent link=Validation Requests
click link=Validation Requests
echo -- Create Article document
waitForElementPresent link=Add Document
click link=Add Document
waitForElementPresent title
type title Test_SNF_ECMS_79
type name Test_SNF_ECMS_79
pause 5000
waitForElementPresent //td[@id='cke_contents_summary']/iframe
selectFrame //td[@id='cke_contents_summary']/iframe
typeKeys //html/body Manchester United
selectFrame relative=top
selectFrame //td[@id='cke_contents_content']/iframe
typeKeys //html/body Manchester United FC
selectFrame relative=top
waitForElementPresent link=Save as Draft
click link=Save as Draft
pause 3000
waitForElementPresent link=Close
click link=Close
pause 3000
waitForElementPresent link=Sign out
clickAndWait link=Sign out
echo -- Manage content publishing
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
clickAndWait link=Business Process Controller
echo -- Manage
waitForElementPresent link=Manage
click link=Manage
echo -- Approve content publishing
waitForElementPresent //table[@class='UIFormGrid']/tbody/tr[3]/td[@class='FieldComponent']/input[@type='text']
click //table[@class='UIFormGrid']/tbody/tr[3]/td[@class='FieldComponent']/input[@type='text']
waitForElementPresent //div[@id='BlockCaledar']/div/table/tbody/tr/td[5]/a
click //div[@id='BlockCaledar']/div/table/tbody/tr/td[5]/a
waitForElementPresent //tr[5]/td[1]/a
click //tr[5]/td[1]/a
waitForElementPresent link=Approve
click link=Approve
echo -- Check where document is stored
waitForElementPresent link=Sites Explorer
clickAndWait link=Sites Explorer
waitForElementPresent //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
click //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
waitForElementPresent link=Workflow
click link=Workflow
waitForElementPresent link=Live
click link=Live
waitForElementPresent //div[2]/div[2]/div/div/div/div[1]/div[2]/div/div[1]/div
click //div[2]/div[2]/div/div/div/div[1]/div[2]/div/div[1]/div
waitForElementPresent //div[2]/div/div[2]/div/div/div/div[2]/a
click //div[2]/div/div[2]/div/div/div/div[2]/a
waitForElementPresent //div[2]/div/div[2]/div/div[2]/div/div/div/div[2]/a
click //div[2]/div/div[2]/div/div[2]/div/div/div/div[2]/a
pause 3000
waitForTextPresent Test_SNF_ECMS_79
verifyTextPresent Test_SNF_ECMS_79
echo -- Delete drive
clickAndWait link=Sites Administration
waitForElementPresent //div[@id='UIECMAdminPortlet']/div[1]/div[1]/div[2]/div/div[2]/div[1]/div/div/div/div[2]
click //div[@id='UIECMAdminPortlet']/div[1]/div[1]/div[2]/div/div[2]/div[1]/div/div/div/div[2]
waitForElementPresent link=Manage Drives
click link=Manage Drives
waitForElementPresent link=3
click link=3
waitForElementPresent //div[@id='UIDriveList']/table/tbody/tr[10]/td[7]/div/img[2]
click //div[@id='UIDriveList']/table/tbody/tr[10]/td[7]/div/img[2]
assertConfirmation Do you really want to delete ?
clickAndWait link=Sites Explorer
waitForElementPresent //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
click //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
pause 5000
waitForElementNotPresent link=Workflow
verifyElementNotPresent link=Workflow
waitForElementPresent link=Sign out
clickAndWait link=Sign out