Test_SNF_ECMS_71_ManageView_ecmdemo
open /ecmdemo/public/acme/
windowMaximize
echo -- Login
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo -- Go to sites Administration
clickAndWait //a[@href='/ecmdemo/groups/:platform:web-contributors/wcmAdmin']
echo -- Go to Content Presentation
waitForElementPresent //div[@id='UIECMAdminPortlet']//div[@class='TabIcon DefaultItemIcon ContentPresentationIcon']
click //div[@id='UIECMAdminPortlet']//div[@class='TabIcon DefaultItemIcon ContentPresentationIcon']
echo -- Manage View
waitForElementPresent link=Manage View
click link=Manage View
echo -- Add View
waitForElementPresent link=Add View
click link=Add View
waitForElementPresent viewName
type viewName LinhNhi
waitForElementPresent //img[@title='Add Permission']
click //img[@title='Add Permission']
echo -- Set any permission
waitForElementPresent //img[@title='Set any Permission']
click //img[@title='Set any Permission']
echo -- Add Tab
waitForElementPresent link=Add Tab
click link=Add Tab
echo -- Set Name
waitForElementPresent tabName
type tabName Linh
echo -- addCategory
check addCategory
echo -- addDocument
check addDocument
echo -- Save
waitForElementPresent link=Save
click link=Save
pause 1000
echo -- Save to Add New
waitForElementPresent link=Save
click link=Save
echo --Edit View : LinhNhi
waitForElementPresent //div[@id='UIViewList']/table/tbody/tr[6]/td[5]/div/img[2]
click //div[@id='UIViewList']/table/tbody/tr[6]/td[5]/div/img[2]
echo --  Add Tab
waitForElementPresent link=Add Tab
click link=Add Tab
waitForElementPresent tabName
type tabName YKhue
echo -- addLocalizationLink
check addLocalizationLink
echo --  addSymLink
check addSymLink
echo -- Save
waitForElementPresent link=Save
click link=Save
pause 1000
waitForElementPresent link=Save
click link=Save
pause 1000
echo -- Apply new view for drive
waitForElementPresent link=Manage Drives
click link=Manage Drives
pause 1000
echo -- Edit Managed Sites
waitForElementPresent //div[@id='UIDriveList']/table/tbody/tr[7]/td[7]/div/img[1]
click //div[@id='UIDriveList']/table/tbody/tr[7]/td[7]/div/img[1]
echo -- Edit Managed Sites
waitForElementPresent //div[text()='Apply Views']
click //div[text()='Apply Views']
echo --  Select "LinhNhi"
waitForElementPresent LinhNhi
click LinhNhi
click link=Save
pause 1000
echo -- Verify new view in drive
waitForElementPresent //a[@href='/ecmdemo/groups/:platform:web-contributors/siteExplorer']
clickAndWait //a[@href='/ecmdemo/groups/:platform:web-contributors/siteExplorer']
echo --  Show Drives
waitForElementPresent //div[@title='Show Drives']
click //div[@title='Show Drives']
echo --  Sites Management
waitForElementPresent link=Sites Management
click link=Sites Management
echo --  Select "Test" view mode
waitForElementPresent //a[text()='Linh']
click //a[text()='Linh']
echo -- Check "Linh" view mode
echo --   Linh Tab
waitForElementPresent //a[text()='Linh']
click //a[text()='Linh']
waitForElementPresent link=Add Document
verifyElementPresent link=Add Document
echo --    YKhue Tab
pause 1000
waitForElementPresent //a[text()='YKhue']
click //a[text()='YKhue']
waitForElementPresent link=Add Translation
verifyElementPresent link=Add Translation
waitForElementPresent link=Add Sym Link
verifyElementPresent link=Add Sym Link
echo -- Remove new view for drive
waitForElementPresent //a[@href='/ecmdemo/groups/:platform:web-contributors/wcmAdmin']
clickAndWait //a[@href='/ecmdemo/groups/:platform:web-contributors/wcmAdmin']
waitForElementPresent //div[@id='UIECMAdminPortlet']//div[@class='TabIcon DefaultItemIcon ContentPresentationIcon']
click //div[@id='UIECMAdminPortlet']//div[@class='TabIcon DefaultItemIcon ContentPresentationIcon']
waitForElementPresent link=Manage Drives
click link=Manage Drives
pause 1000
waitForElementPresent //div[@id='UIDriveList']/table/tbody/tr[7]/td[7]/div/img[1]
click //div[@id='UIDriveList']/table/tbody/tr[7]/td[7]/div/img[1]
pause 1000
waitForElementPresent //div[text()='Apply Views']
click //div[text()='Apply Views']
waitForElementPresent LinhNhi
click LinhNhi
waitForElementPresent link=Save
click link=Save
echo -- Manage View
waitForElementPresent link=Manage View
click link=Manage View
echo -- Delete View
waitForElementPresent //div[@id='UIViewList']/table/tbody/tr[6]/td[5]/div/img[3]
click //div[@id='UIViewList']/table/tbody/tr[6]/td[5]/div/img[3]
assertConfirmation Do you really want to delete ?
echo --Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out