$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->waitForElementPresent('_qf_Contact_cancel-bottom');
//fill in first name
- $firstName = "Anderson".substr(sha1(rand()), 0, 4);
+ $firstName = "Anderson" . substr(sha1(rand()), 0, 4);
$this->type('first_name', $firstName);
//fill in last name
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
$this->waitForElementPresent('_qf_Contact_cancel-bottom');
- $fName = "John".substr(sha1(rand()), 0, 4);
+ $fName = "John" . substr(sha1(rand()), 0, 4);
$this->type('first_name', $fName);
$lName = substr(sha1(rand()), 0, 4);
$this->type('last_name', $lName);
$this->waitForElementPresent('_qf_DedupeFind_submit-bottom');
$this->click("_qf_DedupeFind_next-bottom");
- $this->waitForElementPresent("xpath=//table[@id='option51']/tbody/tr[1]/td[4]/a[text()='merge']");
+ $this->waitForElementPresent("xpath=div[@id='DedupeFind']/div[2]/div/table/tbody/tr[1]/td[4]/a[text()='merge']");
$this->waitForElementPresent("xpath=//*[@id='DedupeFind']/a[3]/span[contains(text(),'Done')]");
$this->isElementPresent("xpath=//table[@id='option51']/tbody/tr/td[1]/a[text()='{$firstName} {$lastName}']/../td[2]/a[text()='{$fName} {$lName}']");
$this->click("xpath=//table[@id='option51']/tbody/tr[1]/td[4]/a[text()='merge']");
// Now we're filling the "Assigned To" field.
// Typing contact's name into the field (using typeKeys(), not type()!)...
- $this->select2("assignee_contact_id", $firstName,TRUE,FALSE);
+ $this->select2("assignee_contact_id", $firstName, TRUE, FALSE);
// ...and verifying if the page contains properly formatted display name for chosen contact.
$this->assertTrue($this->isTextPresent("$lastName, " . $firstName), "Contact not found in line " . __LINE__);
$this->assertTrue($this->isElementPresent("xpath=//div[@id='phone-block']/div/div/div[3]/div[2][contains(text(), '9876543210')]"));
}
- public function testBatchMerge(){
+ public function testBatchMerge() {
$this->webtestLogin();
// add contact1 and its duplicate
//first name
- $firstName = "Kerry".substr(sha1(rand()), 0, 7);
+ $firstName = "Kerry" . substr(sha1(rand()), 0, 7);
//last name
- $lastName = "King".substr(sha1(rand()), 0, 7);
- $this->_createContacts($firstName,$lastName);
+ $lastName = "King" . substr(sha1(rand()), 0, 7);
+ $this->_createContacts($firstName, $lastName);
//add contact2 and its duplicate
//These are the contacts with conflicts in communication preference.these contacts will be skipped during merge.
$this->openCiviPage("contact/add", "reset=1&ct=Individual");
//fill in first name
- $firstName1 = "Kurt".substr(sha1(rand()), 0, 7);
+ $firstName1 = "Kurt" . substr(sha1(rand()), 0, 7);
$this->type('first_name', $firstName1);
//fill in last name
- $lastName1 = "Cobain".substr(sha1(rand()), 0, 7);
+ $lastName1 = "Cobain" . substr(sha1(rand()), 0, 7);
$this->type('last_name', $lastName1);
//fill in email id
// add contact3 and its duplicate
//fill in first name
- $firstName2 = "David".substr(sha1(rand()), 0, 7);
+ $firstName2 = "David" . substr(sha1(rand()), 0, 7);
//fill in last name
- $lastName2 = "Gilmour".substr(sha1(rand()), 0, 7);
- $this->_createContacts($firstName2,$lastName2);
+ $lastName2 = "Gilmour" . substr(sha1(rand()), 0, 7);
+ $this->_createContacts($firstName2, $lastName2);
// add contact4 and its duplicate
//fill in first name
- $firstName3 = "Dave".substr(sha1(rand()), 0, 7);
+ $firstName3 = "Dave" . substr(sha1(rand()), 0, 7);
//fill in last name
- $lastName3 = "Mustaine".substr(sha1(rand()), 0, 7);
- $this->_createContacts($firstName3,$lastName3);
+ $lastName3 = "Mustaine" . substr(sha1(rand()), 0, 7);
+ $this->_createContacts($firstName3, $lastName3);
// Find and Merge Contacts with Supervised Rule
$this->openCiviPage("contact/dedupefind", "reset=1&rgid=1&action=renew", "css=#DedupeFind table.pagerDisplay tbody tr");
// Check confirmation alert.
$this->assertTrue(
- (bool)preg_match("/^This will run the batch merge process on the listed duplicates. The operation will run in safe mode - only records with no direct data conflicts will be merged. Click OK to proceed if you are sure you wish to run this operation./",
+ (bool) preg_match("/^This will run the batch merge process on the listed duplicates. The operation will run in safe mode - only records with no direct data conflicts will be merged. Click OK to proceed if you are sure you wish to run this operation./",
$this->getConfirmation()
));
$this->chooseOkOnNextConfirmation();
3 => "{$firstName3}.{$lastName3}@example.com"
);
- foreach($contactEmails as $key => $value) {
+ foreach ($contactEmails as $key => $value) {
$this->click('sort_name_navigation');
$this->type('css=input#sort_name_navigation', $value);
$this->typeKeys('css=input#sort_name_navigation', $value);
$this->select2('member_of_contact_id', $membershipOrganization);
$this->type('minimum_fee', '1');
- $this->select( 'financial_type_id', 'value=2' );
+ $this->select('financial_type_id', 'value=2');
$this->type('duration_interval', 1);
$this->select('duration_unit', "label=year");
$this->webtestLogin();
// build organisation name
- $orgnaizationName = 'org_'.substr(sha1(rand()), 0, 7);
+ $orgnaizationName = 'org_' . substr(sha1(rand()), 0, 7);
$contactIds = array();
// create organization and its duplicate
$this->openCiviPage("contact/dedupefind", "reset=1&action=update&rgid=4");
$this->click("xpath=//a/span[text()='Refresh Duplicates']");
- $this->assertTrue((bool)preg_match("/This will refresh the duplicates list. Click OK to proceed./", $this->getConfirmation()));
+ $this->assertTrue((bool) preg_match("/This will refresh the duplicates list. Click OK to proceed./", $this->getConfirmation()));
$this->chooseOkOnNextConfirmation();
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->waitForElementPresent("xpath=//a[text()='$firstName $lastName']/../../td[4]/a[text()='merge']");