Test_SNF_ECMS_74_ManageNodeType_ecmdemo
open /ecmdemo/public/acme/
windowMaximize
echo -- Login
waitForElementPresent link=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  Types Of Content
waitForElementPresent //div[@id='UIECMAdminPortlet']//div[@class='TabIcon DefaultItemIcon TypesOfContentIcon']
click //div[@id='UIECMAdminPortlet']//div[@class='TabIcon DefaultItemIcon TypesOfContentIcon']
echo --  Manage Node Type
waitForElementPresent link=Manage Node Type
click link=Manage Node Type
echo --  Add Node
waitForElementPresent link=Add
click link=Add
pause 1000
waitForElementPresent namespace label=nt
select namespace label=nt
type nodeTypeName TieuHuongDuong
type superTypes nt:base
echo -- Save
waitForElementPresent link=Save
click link=Save
echo --confirm message[press OK]
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/a
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/a
echo -- Verify result find Node type
waitForElementPresent NodeTypeText
type NodeTypeText TieuHuongDuong
waitForElementPresent //form[@id='NodeTypeSearchForm']/div[2]/div[1]/div/div/div/div/table/tbody/tr/td[3]/a/div
click //form[@id='NodeTypeSearchForm']/div[2]/div[1]/div/div/div/div/table/tbody/tr/td[3]/a/div
waitForTextPresent nt:TieuHuongDuong
verifyTextPresent nt:TieuHuongDuong
echo --View node Type
waitForElementPresent //div[@id='ListNodeType']/table/tbody/tr[1]/td[6]/a/div
click //div[@id='ListNodeType']/table/tbody/tr[1]/td[6]/a/div
echo -- verify  Super types
waitForValue superTypes nt:base
verifyValue superTypes nt:base
waitForElementPresent link=Close
click link=Close
echo --Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out