Test_PRL_03_02_012_AddNewGroupSameNameWithExisting
open /portal/public/classic/
echo -- Add new group same name with existing--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Go to User and group management--
clickAndWait link=Users and groups management
echo -- Choose Group Management --
waitForElementPresent //div[@class='GroupManagementIcon']
click //div[@class='GroupManagementIcon']
echo -- Create the first group--
waitForElementPresent //a[@title='Add New Group']
click //a[@title='Add New Group']
waitForElementPresent groupName
type groupName Test_PRL_03_02_012
type label Test_PRL_03_02_012
type description Test_PRL_03_02_012
waitForElementPresent link=Save
click link=Save
echo -- Click up level--
waitForElementPresent //div[1]/div[2]/div/div/div/div[1]/a
click //div[1]/div[2]/div/div/div/div[1]/a
echo -- Create same name group in the same path--
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[3]
click //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[3]
waitForElementPresent groupName
type groupName Test_PRL_03_02_012
type label Test_PRL_03_02_012
type description Test_PRL_03_02_012
waitForElementPresent //form[@id='UIGroupForm']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div
click //form[@id='UIGroupForm']/div[2]/div/div/table/tbody/tr/td/div[1]/div/div/div
waitForTextPresent This group name already exists, please enter another one
verifyTextPresent This group name already exists, please enter another one
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
click //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div
waitForElementPresent link=Cancel
click link=Cancel
echo -- Create same name group in different paths--
waitForElementPresent link=Customers
click link=Customers
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[3]
click //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[3]
waitForElementPresent groupName
type groupName Test_PRL_03_02_012
type label Test_PRL_03_02_012
type description Test_PRL_03_02_012
waitForElementPresent link=Save
click link=Save
echo -- Delete first group--
waitForElementPresent link=Test_PRL_03_02_012
click link=Test_PRL_03_02_012
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[1]
click //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[1]
assertConfirmation Are you sure you want to delete this group?
echo -- Delete group in different paths--
waitForElementPresent link=Customers
click link=Customers
waitForElementPresent link=Test_PRL_03_02_012
click link=Test_PRL_03_02_012
waitForElementPresent //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[1]
click //div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/a[1]
assertConfirmation Are you sure you want to delete this group?
clickAndWait link=Sign out