Test_SNF_SOC_11_Demo_AddandDeleteApplication
open /portal/public/intranet/
windowMaximize
echo -- Add and Delete Application in Space
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=My Spaces
clickAndWait link=My Spaces
echo -- Add a new Space
waitForElementPresent link=Add New Space
click link=Add New Space
waitForElementPresent displayName
type displayName Space11
type description This is description for Space_11
click link=Create
pause 30000
echo -- Verify space created
waitForElementPresent link=Space11
click link=Space11
waitForTextPresent Space11 was created
verifyTextPresent Space11 was created
echo -- Add Application
verifyElementPresent //a[contains(@href,'spaces:space11') and @title='Settings']
click //a[contains(@href,'spaces:space11') and @title='Settings']
waitForElementPresent //div[@id='UISpaceSettingPortlet']//div[@class='TabsContainer']/div[4]//div[@class='MiddleTab']
click //div[@id='UISpaceSettingPortlet']//div[@class='TabsContainer']/div[4]//div[@class='MiddleTab']
echo -- Add Application
waitForElementPresent //div[@class='AddAplicationButton']
click //div[@class='AddAplicationButton']//div[@class='IconButton']
echo -- Select Authoring Dashboard
waitForElementPresent //div[text()='Authoring Dashboard']/following-sibling::div[@title='Install']
click //div[text()='Authoring Dashboard']/following-sibling::div[@title='Install']
pause 2000
echo -- Check Application added
click css=#AddApplication > div.OverflowContainer.ClearFix > a.CloseButton
waitForElementPresent //div[@class='NormalTab']//a[contains(@href,'spaces:space11') and @title='Authoring Dashboard']
verifyVisible //div[@class='NormalTab']//a[contains(@href,'spaces:space11') and @title='Authoring Dashboard']
echo -- Delete Application
waitForElementNotPresent //div[text()='Authoring Dashboard']/following-sibling::div//div[@title='Remove']
click //div[text()='Authoring Dashboard']/following-sibling::div//div[@title='Remove']
pause 10000
waitForElementNotPresent //div[@class='NormalTab']//a[contains(@href,'spaces:space11') and @title='Authoring Dashboard']
verifyElementNotPresent //div[@class='NormalTab']//a[contains(@href,'spaces:space11') and @title='Authoring Dashboard']
echo -- Log out
waitForElementPresent link=Logout
clickAndWait link=Logout