Test_SNF_ECMS_68_ManageTaxonomy_ecmdemo
open /portal/public/acme/
windowMaximize
echo -- Login
click link=Login
type username root
type password gtn
clickAndWait link=Sign in
echo -- go to sites Administration
waitForElementPresent link=Content Administration
click link=Content Administration
echo --Go to Ontologies
waitForElementPresent //div[@id='UIECMAdminPortlet']/div[1]/div[1]/div[2]/div/div[1]/div[1]/div/div/div/div[2]
click //div[@id='UIECMAdminPortlet']/div[1]/div[1]/div[2]/div/div[1]/div[1]/div/div/div/div[2]
echo --Go to Manage Taxonomy trees
waitForElementPresent link=Manage Categories
click link=Manage Categories
echo --Add taxonomy
waitForElementPresent link=Add Category Tree
click link=Add Category Tree
waitForElementPresent TaxoTreeName
type TaxoTreeName test1
waitForElementPresent TaxoTreeWorkspace label=collaboration
select TaxoTreeWorkspace label=collaboration
waitForElementPresent //option[@value='collaboration']
click //option[@value='collaboration']
echo --Select Home path
waitForElementPresent //img[@title='Add Path']
click //img[@title='Add Path']
waitForElementPresent //img[@title='AddRootNode']
click //img[@title='AddRootNode']
waitForElementPresent link=Next
click link=Next
echo --Set permission for taxonomy tree node
waitForElementPresent //img[@title='Select Everyone']
click //img[@title='Select Everyone']
check add_node
check set_property
check remove
waitForElementPresent link=Save
click link=Save
waitForElementPresent //form[@id='UIPermissionTreeForm']/div[2]/div/div/table/tbody/tr/td/div[4]/div/div/div/a
click //form[@id='UIPermissionTreeForm']/div[2]/div/div/table/tbody/tr/td/div[4]/div/div/div/a
echo --Register an action for this tree
waitForElementPresent actionName
type actionName action
addSelection lifecycle label=Content Addition
waitForElementPresent targetWorkspace label=collaboration
select targetWorkspace label=collaboration
waitForElementPresent //form[@id='UIActionForm']/div[2]/table/tbody/tr[8]/td[2]/table/tbody/tr/td[2]/a[1]/img
click //form[@id='UIActionForm']/div[2]/table/tbody/tr[8]/td[2]/table/tbody/tr/td[2]/a[1]/img
waitForElementPresent //img[@title='AddRootNode']
click //img[@title='AddRootNode']
waitForElementPresent //form[@id='UIActionForm']/div[2]/div/table/tbody/tr/td/div[2]/div/div/div/a
click //form[@id='UIActionForm']/div[2]/div/table/tbody/tr/td/div[2]/div/div/div/a
echo --Create the first child node
waitForElementPresent //img[@title='Add']
click //img[@title='Add']
waitForElementPresent taxonomyName
type taxonomyName child 1
click //form[@id='UITaxonomyTreeCreateChildForm']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div/a
echo --Create the second child node
waitForElementPresent //img[@title='Add']
click //img[@title='Add']
waitForElementPresent taxonomyName
type taxonomyName child 2
waitForElementPresent //form[@id='UITaxonomyTreeCreateChildForm']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div/a
click //form[@id='UITaxonomyTreeCreateChildForm']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div/a
echo --View 2 child nodes
waitForElementPresent //div[@id='UITaxonomyTreeCreateChild']/div[2]/div/div/div/div/div[2]/a/div
click //div[@id='UITaxonomyTreeCreateChild']/div[2]/div/div/div/div/div[2]/a/div
echo --Copy child 1 to child 2
waitForElementPresent //img[@title='Copy']
click //img[@title='Copy']
waitForElementPresent //tr[2]/td[2]/div/img[4]
click //tr[2]/td[2]/div/img[4]
echo --View Child 2
waitForElementPresent //div[@id='UITaxonomyTreeCreateChild']/div[2]/div/div/div/div/div[3]/a/div
click //div[@id='UITaxonomyTreeCreateChild']/div[2]/div/div/div/div/div[3]/a/div
echo --verify child 1 in child 2
waitForElementPresent //div[@id="UITaxonomyTreeCreateChild"]/div[2]/div/div/div/div/div[3]/div/div/a/div
verifyVisible //div[@id="UITaxonomyTreeCreateChild"]/div[2]/div/div/div/div/div[3]/div/div/a/div
echo --Go to test taxonomy
waitForElementPresent //div[@id='UITaxonomyTreeCreateChild']/div[2]/div/div/div/div/div[1]/a
click //div[@id='UITaxonomyTreeCreateChild']/div[2]/div/div/div/div/div[1]/a
echo --Cut child 2 to child 1
waitForElementPresent //tr[2]/td[2]/div/img[3]
click //tr[2]/td[2]/div/img[3]
waitForElementPresent //img[@title='Paste']
click //img[@title='Paste']
echo --View child 1
waitForElementPresent //div[@id='UITaxonomyTreeCreateChild']/div[2]/div/div/div/div/div[2]/a/div
click //div[@id='UITaxonomyTreeCreateChild']/div[2]/div/div/div/div/div[2]/a/div
echo -- Verify child 2 in child 1
waitForElementPresent //div[@id="UITaxonomyTreeCreateChild"]/div[2]/div/div/div/div/div[2]/div/div/a/div
verifyVisible //div[@id="UITaxonomyTreeCreateChild"]/div[2]/div/div/div/div/div[2]/div/div/a/div
pause 2000
echo -- Delete child 2 in child 1
waitForElementPresent //img[6]
click //img[6]
assertConfirmation Do you really want to delete?
echo --close the form to add taxonomy
waitForElementPresent //div[2]/div[2]/div/div[1]/div/div/div/div[2]
click //div[2]/div[2]/div/div[1]/div/div/div/div[2]
pause 2000
echo --Edit taxonomy tree
waitForElementPresent //tr[5]/td[5]/div/img[1]
click //tr[5]/td[5]/div/img[1]
waitForElementPresent //div[@id='UITaxonomyTreeCreateChild']/div[4]/table/tbody/tr/td/div/div/div/div/a
click //div[@id='UITaxonomyTreeCreateChild']/div[4]/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent lifecycle label=User Action
addSelection lifecycle label=User Action
waitForElementPresent //option[@value='read']
click //option[@value='read']
waitForElementPresent //form[@id='UIActionForm']/div[2]/div/table/tbody/tr/td/div[2]/div/div/div/a
click //form[@id='UIActionForm']/div[2]/div/table/tbody/tr/td/div[2]/div/div/div/a
waitForElementPresent //div[2]/div[2]/div/div[1]/div/div/div/div[2]
click //div[2]/div[2]/div/div[1]/div/div/div/div[2]
echo --Delete Taxonomy
waitForElementPresent //tr[5]/td[5]/div/img[2]
click //tr[5]/td[5]/div/img[2]
assertConfirmation Are you sure to delete?
echo --Logout
waitForElementPresent link=Logout
clickAndWait link=Logout