* @return int
*/
- function webtestAddPaymentProcessor($processorName, $processorType = 'Dummy', $processorSettings = NULL, $financialAccount = 'Deposit Bank Account') {
+ function webtestAddPaymentProcessor($processorName = 'Test Processor', $processorType = 'Dummy', $processorSettings = NULL, $financialAccount = 'Deposit Bank Account') {
if (!$processorName) {
$this->fail("webTestAddPaymentProcessor requires $processorName.");
}
- if ($processorType == 'Dummy') {
- $processorSettings = array(
- 'user_name' => 'dummy',
- 'url_site' => 'http://dummy.com',
- 'test_user_name' => 'dummytest',
- 'test_url_site' => 'http://dummytest.com',
- );
+ if ($processorName === 'Test Processor') {
+ // Use the default test processor, no need to create a new one
+ $this->openCiviPage('admin/paymentProcessor', 'action=update&id=1&reset=1');
+ $this->check('is_default');
+ $this->clickLink('_qf_PaymentProcessor_next-bottom');
+ return 1;
}
elseif ($processorType == 'AuthNet') {
// FIXME: we 'll need to make a new separate account for testing
function webtestAddContributionPage($hash = NULL,
$rand = NULL,
$pageTitle = NULL,
- $processor = array('Dummy Processor' => 'Dummy'),
+ $processor = array('Test Processor' => 'Dummy'),
$amountSection = TRUE,
$payLater = TRUE,
$onBehalf = TRUE,
$this->waitForTextPresent("{$customGroupTitle} - New Field");
$fieldLabel = "custom_field_for_{$customSet['entity']}_{$customSet['subEntity']}" . substr(sha1(rand()), 0, 4);
+ $this->waitForElementPresent('label');
$this->type('label', $fieldLabel);
$this->click('_qf_Field_done-bottom');
- $customGroupTitle = preg_replace('/\s/', '_', trim($customGroupTitle));
+ $this->waitForText('crm-notification-container', $fieldLabel);
+ $this->waitForAjaxContent();
+
+ $customGroupTitle = preg_replace('/\s/', '_', trim($customGroupTitle));
$return[] = array(
"{$customSet['entity']}_{$customSet['subEntity']}" => array('cgtitle' => $customGroupTitle, 'gid' => $gid, 'triggerElement' => $customSet['triggerElement']));
}
- // Avoid weird qf_key bug when going straight from here to the next form
- $this->openCiviPage('');
return $return;
}
* @param $id
*/
function onlineContributionAddTest($campaignTitle, $id) {
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$paymentProcessorId = $this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("admin/contribute/add", "reset=1&action=add");
* @param $id
*/
function onlineParticipantAddTest($campaignTitle, $id) {
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$paymentProcessorId = $this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("event/add", "reset=1&action=add");
$this->select("campaign_survey_id", "label=Survey $title");
$this->waitForElementPresent('_qf_Search_refresh');
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
$this->waitForText("xpath=//div[@id='search-status']/table/tbody/tr[1]/td[1]",'1 Result');
}
$this->select2("xpath=//tr[@class='addRow']/td[contains(text(),'Add activity:')]/span/div/a", $tActivityType, FALSE, TRUE);
}
- $this->click("xpath=//div[@class='crm-submit-buttons']/span/input[@value='Save']");
+ $this->clickAjaxLink("xpath=//div[@class='crm-submit-buttons']/span/input[@value='Save']", NULL);
$this->openCiviPage('case/add', 'reset=1&action=add&atype=13&context=standalone', '_qf_Case_upload-bottom');
$firstName = substr(sha1(rand()), 0, 7);
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$paymentProcessorId = $this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage('event/add', 'reset=1&action=add');
$this->waitForElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]");
$createdBy = $this->getText("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td[3]/a");
$this->click("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td[7]/span/a[2]");
- $this->waitForElementPresent("xpath=//form[@id='Edit']/div[2]/div/table[2]/tbody/tr/td[2]/select");
-
- //assert created by in the edit page
- $this->assertTrue($this->isElementPresent(
- "xpath=//form[@id='Edit']/div[2]/div/table/tbody/tr[2]/td[contains(text(), '{$createdBy}')]"));
+ $this->waitForElementPresent("xpath=//form[@id='Edit']/div[2]/div/table/tbody/tr[2]/td[contains(text(), '{$createdBy}')]");
$this->openCiviPage('group', 'reset=1');
//search groups using created by
$this->type('created_by', $createdBy);
- $this->click('_qf_Search_refresh');
+ $this->clickLink('_qf_Search_refresh');
//show maximum no. of groups on first result set page
//as many groups can be created by same creator
$this->waitForElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]");
$this->click("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]/../following-sibling::td[2]/a[text()='{$createdBy}']");
- $this->assertTrue($this->isElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]/../following-sibling::td[2]/a[text()='{$createdBy}']"));
+ $this->waitForElementPresent("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody/tr/td/span[contains(text(), '{$params['name']}')]/../following-sibling::td[2]/a[text()='{$createdBy}']");
//check link of the contact who created the group
- $this->click("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody//tr/td[1]/span[contains(text(),'{$params['name']}')]/../following-sibling::td[2]/a");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("xpath=//table[@class='crm-group-selector no-footer dataTable']/tbody//tr/td[1]/span[contains(text(),'{$params['name']}')]/../following-sibling::td[2]/a", "css=div.crm-summary-display_name");
$name = explode(',', $createdBy);
$name1 = isset($name[1]) ? trim($name[1]) : NULL;
$name0 = trim($name[0]);
$this->click("is_reserved");
// Clicking save.
- $this->click("_qf_Edit_upload");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Edit_upload");
// Is status message correct?
- $this->assertTrue($this->isTextPresent("The Group '{$params['name']}' has been saved."));
+ $this->waitForText('crm-notification-container', "The Group '{$params['name']}' has been saved.");
// Create a new role w/o reserved group permissions
$role = 'role' . substr(sha1(rand()), 0, 7);
$this->waitForElementPresent("edit-add");
$this->type("edit-name", $role);
- $this->click("edit-add");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("edit-add", NULL);
$this->open($this->sboxPath . "admin/people/permissions/roles");
$this->waitForElementPresent("xpath=//table[@id='user-roles']/tbody//tr/td[1][text()='{$role}']");
// load the Price Set Preview and check for expected values
$this->_testVerifyPriceSet($validateStrings, $sid);
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("admin/contribute/add", "reset=1&action=add");
// load the Price Set Preview and check for expected values
$this->_testVerifyPriceSet($validateStrings, $sid);
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("admin/contribute/add", "reset=1&action=add");
$rand = 2 * rand(2, 50);
$pageTitle = 'Donate Online ' . $hash;
// create contribution page with randomized title and default params
- $pageId = $this->webtestAddContributionPage($hash, $rand, $pageTitle, array("Webtest Dummy" . substr(sha1(rand()), 0, 7) => 'Dummy'), TRUE, TRUE, 'required');
+ $pageId = $this->webtestAddContributionPage($hash, $rand, $pageTitle, array('Test Processor' => 'Dummy'), TRUE, TRUE, 'required');
$this->openCiviPage("admin/contribute", "reset=1");
$rand = 2 * rand(2, 50);
$pageTitle = 'Donate Online ' . $hash;
// create contribution page with randomized title and default params
- $pageId = $this->webtestAddContributionPage($hash, $rand, $pageTitle, array("Webtest Dummy" . substr(sha1(rand()), 0, 7) => 'Dummy'), TRUE, TRUE, 'required');
+ $pageId = $this->webtestAddContributionPage($hash, $rand, $pageTitle, array('Test Processor' => 'Dummy'), TRUE, TRUE, 'required');
$this->openCiviPage("admin/contribute", "reset=1");
$pageTitle = 'Donate Online ' . $hash;
// create contribution page with randomized title, default params and separate payment for Membership and Contribution
- $pageId = $this->webtestAddContributionPage($hash, $rand, $pageTitle, array("Webtest Dummy" . substr(sha1(rand()), 0, 7) => 'Dummy'),
+ $pageId = $this->webtestAddContributionPage($hash, $rand, $pageTitle, array('Test Processor' => 'Dummy'),
TRUE, TRUE, 'required', TRUE, FALSE, TRUE, NULL, TRUE,
1, 7, TRUE, TRUE, TRUE, TRUE, FALSE, TRUE
);
$hash = substr(sha1(rand()), 0, 7);
$rand = 2 * rand(2, 50);
$pageTitle = 'Donate Online ' . $hash;
- $processor = array("Webtest Dummy" . substr(sha1(rand()), 0, 7) => 'Dummy');
+ $processor = array('Test Processor' => 'Dummy');
// Create a new payment processor
while (list($processorName, $processorType) = each($processor)) {
$this->webtestAddContact($firstName, $lastName, $email);
$cid = $this->urlArg('cid');
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$processorType = 'Dummy';
$pageTitle = substr(sha1(rand()), 0, 7);
$rand = 100;
$this->click("details-save");
$this->waitForPageToLoad($this->getTimeoutMsec());
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$processorType = 'Dummy';
$pageTitle = substr(sha1(rand()), 0, 7);
$rand = 100;
$this->click('_qf_Field_next-bottom');
$this->waitForPageToLoad($this->getTimeoutMsec());
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$processorType = 'Dummy';
$pageTitle = substr(sha1(rand()), 0, 7);
$rand = 100;
function testOnlineContributionAdd() {
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$processorType = 'Dummy';
$pageTitle = substr(sha1(rand()), 0, 7);
$rand = 2 * rand(10, 50);
function testOnlineContributionWithZeroAmount () {
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$processorType = 'Dummy';
$pageTitle = substr(sha1(rand()), 0, 7);
$rand = 2 * rand(10, 50);
$hash = substr(sha1(rand()), 0, 7);
$rand = $contributionAmount = 2 * rand(2, 50);
$pageTitle = 'PCP Contribution' . $hash;
- $processorType = 'Dummy';
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
$amountSection = TRUE;
$payLater = TRUE;
$onBehalf = FALSE;
$pageId = $this->webtestAddContributionPage($hash,
$rand,
$pageTitle,
- array($processorName => $processorType),
+ array('Test Processor' => 'Dummy'),
$amountSection,
$payLater,
$onBehalf,
$this->type("cms_confirm_pass", $pass);
}
- $this->click("_qf_PCPAccount_next-bottom");
-
- $this->waitForElementPresent("_qf_Campaign_upload-bottom");
+ $this->clickLink("_qf_PCPAccount_next-bottom", "_qf_Campaign_upload-bottom");
$pcpTitle = 'PCPTitle' . substr(sha1(rand()), 0, 7);
$this->type("pcp_title", $pcpTitle);
$this->webtestLogin();
$this->openCiviPage("admin/pcp", "reset=1", "_qf_PCP_refresh");
$this->select('status_id', 'value=1');
- $this->click("_qf_PCP_refresh");
- $this->waitForElementPresent("_qf_PCP_refresh");
+ $this->clickLink("_qf_PCP_refresh", "_qf_PCP_refresh");
$id = explode('id=', $this->getAttribute("xpath=//div[@id='option11_wrapper']/table[@id='option11']/tbody/tr/td/a[text()='$pcpTitle']@href"));
$pcpId = trim($id[1]);
$pcpUrl = "civicrm/contribute/pcp/info?reset=1&id=$pcpId";
- $this->click("xpath=//td[@id=$pcpId]/span[1]/a[2]");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("xpath=//td[@id=$pcpId]/span[1]/a[2]");
// logout
$this->webtestLogout();
*/
function _testOnlineContribution($firstName, $lastName, $email) {
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$processorType = 'Dummy';
$pageTitle = substr(sha1(rand()), 0, 7);
$rand = 2 * rand(2, 50);
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("event/add", "reset=1&action=add");
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("event/add", "reset=1&action=add");
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("event/add", "reset=1&action=add");
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("event/add", "reset=1&action=add");
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("event/add", "reset=1&action=add");
// load the Price Set Preview and check for expected values
$this->_testVerifyPriceSet($validateStrings, $sid);
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom');
// load the Price Set Preview and check for expected values
$this->_testVerifyPriceSet($validateStrings, $sid);
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage('event/add', 'reset=1&action=add', '_qf_EventInfo_upload-bottom');
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("event/add", "reset=1&action=add");
$this->click("_qf_Event_next-top");
$this->waitForPageToLoad($this->getTimeoutMsec());
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
//event 1
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
//event 1
$email1 = $firstName . "@test.com";
$email2 = $participantfname . "@test.com";
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
//add email to name and address profile
$email3 = $participantfname2 . "@test.com";
$email4 = $firstName2 . "@test.com";
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
//add email field to name and address profile
$conPcp = FALSE;
$conIsAprovalNeeded = TRUE;
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
//create contribution page for event pcp with campaign type as contribution
$contributionPageId = $this->webtestAddContributionPage($conHash,
$this->select2("event_id", $eventName);
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
$this->clickLink("xpath=//div[@id='participantSearch']/table/tbody/tr[1]/td[@class='crm-participant-sort_name']/a[text()='{$sortName}']/../../td[11]/span/a[text()='View']", "xpath=//table[@class='selector row-highlight']/tbody/tr/td[8]/span/a[text()='View']", FALSE);
$this->click("xpath=//table[@class='selector row-highlight']/tbody/tr/td[8]/span/a[text()='View']");
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
// create an event
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
// create priceset
$crypticName = "foobardoogoo_" . md5(time());
$this->type("sort_name", $crypticName);
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
$stringsToCheck = array(
'No matches found for',
$eventName = "Fall Fundraiser Dinner";
$this->select2("event_id", $eventName);
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
$stringsToCheck = array(
"Event = $eventName",
$this->webtestFillDate('event_start_date_low', '-2 year');
$this->webtestFillDate('event_end_date_high', '+1 year');
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
$stringsToCheck = array(
"Start Date - greater than or equal to",
$eventTypeName = 'Fundraiser';
$this->select2("event_type_id", $eventTypeName);
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
$stringsToCheck = array(
"Start Date - greater than or equal to",
$this->select("xpath=//div[@id='Food_Preference']/div[2]/table/tbody/tr/td[2]//select", 'Chicken Combo');
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
// note since this is generated data
// we are not sure if someone has this selection, so
$this->_checkStrings($stringsToCheck);
$this->select("xpath=//div[@id='Food_Preference']/div[2]/table/tbody/tr/td[2]//select", 'Salmon Stew');
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
$stringsToCheck = array("Soup Selection = Salmon Stew");
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
// create priceset
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
// create priceset
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
// create priceset
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = 'Webtest Dummy' . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
// create priceset
)) {
if (empty($params)) {
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
// create an event
if (empty($params)) {
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
// create an event
$this->type("sort_name", $contactName);
$this->click('activity_type_id[35]');
$this->click('activity_type_id[36]');
- $this->click("_qf_Search_refresh");
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink("_qf_Search_refresh");
$this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[2]/td[2][text()='Change Membership Status']"));
$this->assertTrue($this->isElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr[2]/td[3][text()='Status changed from New to Current']"));
$this->_testVerifyPriceSet($validateStrings, $sid);
$contributionPageTitle = "Contribution Page $title";
- $paymentProcessor = "Webtest Dummy $title";
- $pageId = $this->webtestAddContributionPage(NULL, NULL, $contributionPageTitle, array($paymentProcessor => 'Dummy'),
+ $pageId = $this->webtestAddContributionPage(NULL, NULL, $contributionPageTitle, array('Test Processor' => 'Dummy'),
TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, $sid, FALSE, 1, NULL
);
$i = 2;
foreach($options as $index => $values){
$this->select("membership_type_id_{$index}", "value={$values['membership_type_id']}");
- // Because it tends to cause problems, all uses of sleep() must be justified in comments
- // Sleep should never be used for wait for anything to load from the server
- // Justification for this instance: FIXME
- sleep(1);
+
+ $this->waitForElementPresent("xpath=//table[@id='optionField']/tbody/tr[$i]/td[4]/input");
$this->type("xpath=//table[@id='optionField']/tbody/tr[$i]/td[4]/input",$values['membership_num_terms']);
$this->type("xpath=//table[@id='optionField']/tbody/tr[$i]/td[5]/input",$values['label']);
$this->type("xpath=//table[@id='optionField']/tbody/tr[$i]/td[6]/input",$values['amount']);
if($i > 3){
$this->click('link=another choice');
-
}
$i++;
}
$this->waitForElementPresent( 'financial_type_id' );
$this->select("financial_type_id", "label={$contributionType}");
$this->waitForElementPresent('_qf_Field_next-bottom');
- $this->click('_qf_Field_next-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
+ $this->clickLink('_qf_Field_next-bottom');
$this->waitForText('crm-notification-container', "Price Field '{$fields[0]}' has been saved.");
// load the Price Set Preview and check for expected values
$this->_testVerifyPriceSet($validateStrings, $sid);
$contributionPageTitle = "Contribution Page $title";
- $paymentProcessor = "Webtest Dummy $title";
- $pageId = $this->webtestAddContributionPage(NULL, NULL, $contributionPageTitle, array($paymentProcessor => 'Dummy'),
+ $pageId = $this->webtestAddContributionPage(NULL, NULL, $contributionPageTitle, array('Test Processor' => 'Dummy'),
TRUE, FALSE, FALSE, FALSE, FALSE, TRUE, $sid, FALSE, 1, NULL
);
$hash = substr(sha1(rand()), 0, 7);
$rand = 2 * rand(2, 50);
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
// create contribution page with randomized title and default params
$amountSection = TRUE;
$hash = substr(sha1(rand()), 0, 7);
$rand = 2 * rand(2, 50);
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$amountSection = TRUE;
$payLater = TRUE;
$allowOtherAmmount = TRUE;
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("admin/contribute/amount", "reset=1&action=update&id=2", "_qf_Amount_next");
// Log in using webtestLogin() method
$this->webtestLogin();
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
$this->webtestAddPaymentProcessor($processorName);
$this->openCiviPage("admin/contribute/amount", "reset=1&action=update&id=2", '_qf_Amount_next');
preg_match('/id=([0-9]+)/', $url, $matches);
$membershipTypeId = $matches[1];
- // We need a payment processor
- $processorName = "Webtest Dummy" . substr(sha1(rand()), 0, 7);
+ // Use default payment processor
+ $processorName = 'Test Processor';
// create contribution page with randomized title and default params
$hash = substr(sha1(rand()), 0, 7);