Create Edit Delete Tasks For Opportunity
setTimeout 45000
open index.php/opportunities/default
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
verifyTextPresent Create
verifyTextPresent Advanced
type OpportunitiesSearchForm_anyMixedAttributes Test Opportunity ${randomSuffix}
keyUp OpportunitiesSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForText //div[@id='list-view']/div[2]/table/tbody/tr[1]/td[3]/a Test Opportunity ${randomSuffix}
verifyTextPresent Test Opportunity ${randomSuffix}
clickAndWait link=Test Opportunity ${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Test Opportunity ${randomSuffix}
click //div[@id='OpportunityDetailsAndRelationsView']/div[2]/div/ul[2]/li[2]/div[1]/div/div/div/a/span
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Create Task
type Task_name Task kick-off opportunity ${randomSuffix}
click link=More Details
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click Task_dueDateTime
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Hour
click //div[@id='ui-datepicker-div']/div[1]/a[2]/span
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click //div[@id='ui-datepicker-div']/table/tbody/tr[2]/td[3]/a
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click //div[@id='ui-datepicker-div']/div[3]/button[2]
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click TaskActivityItemForm_Account_SelectLink
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForElementPresent AccountsSearchForm_anyMixedAttributes
type AccountsSearchForm_anyMixedAttributes my account ${randomSuffix}
keyUp AccountsSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForText //div[@id='list-viewmodal']/div[2]/table/tbody/tr/td[1]/a my account ${randomSuffix}
verifyTextPresent my account ${randomSuffix}
click //div[@id='list-viewmodal']/div[2]/table/tbody/tr/td[1]/a
waitForValue TaskActivityItemForm_Account_name my account ${randomSuffix}
click TaskActivityItemForm_Contact_SelectLink
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForElementPresent ContactsSearchForm_anyMixedAttributes
type ContactsSearchForm_anyMixedAttributes Jinny Jane ${randomSuffix}
keyUp ContactsSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForText //div[@id='list-viewmodal']/div[2]/table/tbody/tr/td[1]/a Jinny Jane ${randomSuffix}
verifyTextPresent Jinny Jane ${randomSuffix}
click //div[@id='list-viewmodal']/div[2]/table/tbody/tr/td[1]/a
waitForValue TaskActivityItemForm_Contact_name Jinny Jane ${randomSuffix}
verifyValue TaskActivityItemForm_Opportunity_name Test Opportunity ${randomSuffix}
type Task_description This is a test Task
click Task_owner_SelectLink
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForElementPresent UsersSearchForm_anyMixedAttributes
type UsersSearchForm_anyMixedAttributes Sam Smith
keyUp UsersSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForText //div[@id='list-viewmodal']/div[2]/table/tbody/tr[1]/td/a Sam Smith
click link=Sam Smith
waitForValue Task_owner_name Sam Smith
click Task_explicitReadWriteModelPermissions_type_2
click //div[@id='TaskModalEditView']/div/div/form/div[3]/div/div/a[1]/span[3]
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click css=span.ui-icon.ui-icon-closethick
click link=Task kick-off opportunity ${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Task kick-off opportunity ${randomSuffix}
verifyTextPresent my account ${randomSuffix}
verifyTextPresent Test Opportunity ${randomSuffix}
verifyTextPresent Jinny Jane ${randomSuffix}
verifyTextPresent Everyone
verifyTextPresent This is a test Task
click //div[@id='TaskModalDetailsView']/div[1]/div/ul/li/ul/li[1]/a/span
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
type Task_name Task kick-off new opportunity ${randomSuffix}
select id=Task_status_value label=Completed
click link=More Details
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click Task_dueDateTime
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Hour
click //div[@id='ui-datepicker-div']/div[1]/a[2]/span
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click //div[@id='ui-datepicker-div']/table/tbody/tr[3]/td[3]/a
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click //div[@id='ui-datepicker-div']/div[3]/button[2]
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click Task_explicitReadWriteModelPermissions_type_0
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click //div[@id='TaskModalEditView']/div/div/form/div[3]/div/div/a[1]/span[3]
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click //div[@id='TaskModalDetailsView']/div[1]/div/ul/li/ul/li[4]/a/span
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForConfirmation Are you sure you want to delete this task?
chooseOkOnNextConfirmation
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
open index.php/opportunities/default
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
verifyTextPresent Create
verifyTextPresent Advanced
type OpportunitiesSearchForm_anyMixedAttributes Test Opportunity ${randomSuffix}
keyUp OpportunitiesSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
verifyTextPresent Test Opportunity ${randomSuffix}
clickAndWait link=Test Opportunity ${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Test Opportunity ${randomSuffix}
assertTextNotPresent Task kick-off new opportunity ${randomSuffix}
open index.php/opportunities/default
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click id=clear-search-link
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextNotPresent Criteria Selected