<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
*/
require_once 'CiviTest/CiviSeleniumTestCase.php';
+
+/**
+ * Class WebTest_Contact_DeceasedContactsAdvancedSearchTest
+ */
class WebTest_Contact_DeceasedContactsAdvancedSearchTest extends CiviSeleniumTestCase {
protected function setUp() {
$this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
// Select the group and check deceased contacts
- $this->select('crmasmSelect1', "label={$groupName}");
+ $this->select('group', "label={$groupName}");
$this->click('demographics');
$this->waitForElementPresent('CIVICRM_QFID_1_is_deceased');
$this->click('CIVICRM_QFID_1_is_deceased');
$this->waitForTextPresent('2 Selected records only');
$this->select('task', 'label=Remove Contacts from Group');
- $this->click("xpath=//div[@id='search-status']/table/tbody/tr[3]/td/ul/input[2]");
+ $this->click("Go");
$this->waitForElementPresent('_qf_RemoveFromGroup_back-bottom');
$this->assertElementContainsText('crm-container', 'Number of selected contacts: 2');
$this->select('group_id', "label={$groupName}");
// Search for the contacts who are not deceased
$this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
- $this->select('crmasmSelect1', "label={$groupName}");
+ $this->select('group', "label={$groupName}");
$this->click('_qf_Advanced_refresh');
// Check if non-deceased contacts are still present
$this->assertElementContainsText('search-status', '3 Contacts');
}
+ /**
+ * @param $firstName
+ * @param $lastName
+ * @param $email
+ * @param $groupName
+ * @param bool $deceased
+ */
function _testAddContact($firstName, $lastName, $email, $groupName, $deceased = FALSE) {
$this->webtestAddContact($firstName, $lastName, $email);
if ($deceased) {
$this->waitForElementPresent('_qf_GroupContact_next');
$this->select('group_id', "{$groupName}");
$this->click('_qf_GroupContact_next');
- $this->waitForPageToLoad($this->getTimeoutMsec());
}
}