Create Edit Delete Tasks For Accounts
setTimeout 45000
open index.php/accounts/default
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
verifyTextPresent Create
verifyTextPresent Advanced
type AccountsSearchForm_anyMixedAttributes my account ${randomSuffix}
keyUp AccountsSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForText //div[@id='AccountsListView']/div//table/tbody/tr/td[2]/a my account ${randomSuffix}
verifyTextPresent my account ${randomSuffix}
clickAndWait link=my account ${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent my account ${randomSuffix}
clickAndWait //div[contains(@class, 'OpenTasksForAccountRelatedListView')]/div[1]/div/a
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Create Task
type Task_name Task kick-off account ${randomSuffix}
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
verifyValue ActivityItemForm_Account_name my account ${randomSuffix}
click ActivityItemForm_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']/table/tbody/tr/td[1]/a Jinny Jane ${randomSuffix}
click //div[@id='list-viewmodal']/table/tbody/tr/td[1]/a
waitForValue ActivityItemForm_Contact_name Jinny Jane ${randomSuffix}
click ActivityItemForm_Opportunity_SelectLink
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForElementPresent OpportunitiesSearchForm_anyMixedAttributes
type OpportunitiesSearchForm_anyMixedAttributes Test Opportunity ${randomSuffix}
keyUp OpportunitiesSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForText //div[@id='list-viewmodal']/table/tbody/tr/td[1]/a Test Opportunity ${randomSuffix}
verifyTextPresent Test Opportunity ${randomSuffix}
click //div[@id='list-viewmodal']/table/tbody/tr/td[1]/a
waitForValue ActivityItemForm_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='UsersModalListView']/div/table/tbody/tr/td/a Sam Smith
click link=Sam Smith
waitForValue Task_owner_name Sam Smith
click Task_explicitReadWriteModelPermissions_type_2
clickAndWait save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Task kick-off account ${randomSuffix}
clickAndWait link=Task kick-off account ${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Task kick-off account ${randomSuffix}
verifyTextPresent my account ${randomSuffix}
verifyTextPresent Test Opportunity ${randomSuffix}
verifyTextPresent Jinny Jane ${randomSuffix}
verifyTextPresent Everyone
verifyTextPresent This is a test Task
clickAndWait link=Edit
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
type Task_name Task kick-off new account ${randomSuffix}
click Task_completed
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
click Task_completedDateTime
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
clickAndWait save
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent Task kick-off new account ${randomSuffix}
assertNotEditable Task_completed
verifyValue Task_completed on
verifyTextPresent Owner
clickAndWait link=Delete
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/accounts/default
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
verifyTextPresent Create
verifyTextPresent Advanced
type AccountsSearchForm_anyMixedAttributes my account ${randomSuffix}
keyUp AccountsSearchForm_anyMixedAttributes \10
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent my account ${randomSuffix}
verifyTextPresent my account ${randomSuffix}
clickAndWait link=my account ${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent my account ${randomSuffix}
clickAndWait link=Task kick-off new account ${randomSuffix}
waitForPageToLoad
waitForCondition selenium.browserbot.getCurrentWindow().jQuery.active == 0 30000
waitForTextPresent The record you are trying to access does not exist.