$this->webtestAddPaymentProcessor($processorName);
//add email field to name and address profile
- $cfId = $this->_addEmailField( );
+ $cfId = $this->_addEmailField();
// create custom group1
$this->openCiviPage("admin/custom/group", "reset=1");
// delete all custom data
if (isset($cfId)) {
-
$this->_removeEmailField($cfId);
}
foreach ($customId as $cid) {
$profilefield = array(
'middle_name' => 'middle_name',
- 'gender' => 'gender',
+ 'gender' => 'gender_id',
);
$location = 0;
$type = "Individual";
}
function _testEventRegistration($eventPageId, $customId, $firstName, $lastName,
- $participantfname, $participantlname, $email1, $email2
+ $participantfname, $participantlname, $email1, $email2
) {
$this->openCiviPage("event/register", "id={$eventPageId}&reset=1", "_qf_Register_upload-bottom");
$this->select("additional_participants", "value=1");
$this->type("custom_" . $customId[2], "lname_custom1");
$this->type("middle_name", "xyz");
- $this->click("name=gender value=2");
+ $this->click("name=gender_id value=2");
$this->select("participant_role", "value=2");
$this->click("_qf_Register_upload-bottom");
$this->type("custom_" . $customId[2], "lname_custom1");
$this->type("middle_name", "xyz");
- $this->click("name=gender value=2");
+ $this->click("name=gender_id value=2");
$this->select("participant_role", "value=2");
$this->click("_qf_Register_upload-bottom");
$this->click("_qf_Confirm_next-bottom");
}
- function _addEmailField( ){
+ function _addEmailField() {
//add email field in name and address profile
$this->openCiviPage('admin/uf/group/field/add', 'reset=1&action=add&gid=1', "_qf_Field_next-bottom");
$this->select("field_name[0]", "value=Contact");
$cfId = "";
//check wheather webtest has created the field
- if($this->assertElementNotContainsText('crm-notification-container', "The selected field was not added. It already exists in this profile")) {
+ if ($this->assertElementNotContainsText('crm-notification-container', "The selected field was not added. It already exists in this profile")) {
$this->waitForElementPresent("xpath=//div[@id='field_page']//table/tbody//tr[8]/td[9]/span/a[text()='Edit']");
$cfId = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr[8]/td[9]/span/a[text()='Edit']/@href"));
$cfId = $cfId[1];
}
function _removeEmailField($cfId) {
-
$this->openCiviPage("admin/uf/group/field", "action=delete&id={$cfId}");
$this->click("_qf_Field_next-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());