}
public function testAdvanceSearch() {
- $this->markTestSkipped('Skipping for now as it works fine locally.');
+ //$this->markTestSkipped('Skipping for now as it works fine locally.');
$this->webtestLogin();
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->clickLink("_qf_Advanced_refresh");
// verify unique name
$this->waitForAjaxContent();
+ $this->waitForAjaxContent();
$this->waitForElementPresent("xpath=//div[@class='crm-search-results']/table/tbody/tr//td/a[text()='adv$firstName, $firstName']");
// should give 1 result only as we are searching with unique name
$this->waitForText("xpath=//div[@id='search-status']/table/tbody/tr/td", preg_quote("1 Contact"));
* Check for CRM-14952
*/
public function testStateSorting() {
- $this->markTestSkipped('Skipping for now as it works fine locally.');
$this->webtestLogin();
$this->openCiviPage('contact/search/advanced', 'reset=1', 'group');
$this->select2("group", "Newsletter", TRUE);
// fill partial sort name
$this->type("sort_name", "$firstName");
// select subtype
- $this->select("contact_type", "value=Individual\ 1Student");
+ $this->select("contact_type", "value=Individual__Student");
// select group
$this->select("group", "label=$groupName");
// select tag
// select preferred communication method
// phone
- $this->check("preferred_communication_method[1]");
- // email
- $this->check("preferred_communication_method[2]");
+ $this->select2("preferred_communication_method", array('Phone', 'Email'), TRUE);
}
/**
*/
public function addMemberSearchDetail($firstName) {
// check membership type (Student)
- $this->click("xpath=//div[@id='memberForm']/table/tbody/tr[1]/td[1]/div[1]//div/label[text()='Student']");
+ $this->select2('membership_type_id', 'Student', TRUE);
// check membership status (completed)
- $this->click("xpath=//div[@id='memberForm']/table/tbody/tr[1]/td[2]/div[1]//div/label[text()='New']");
+ $this->select2('membership_status_id', 'New', TRUE);
// fill member source
$this->type("member_source", "membership source$firstName");
// check to search primary member
$this->webtestFillDate("pledge_payment_date_low", "-1 day");
$this->webtestFillDate("pledge_payment_date_high", "+1 day");
// fill Pledge payment status
- $this->click("xpath=//div[@id='pledgeForm']/table/tbody/tr[3]/td//label[text()='Completed']");
- $this->click("xpath=//div[@id='pledgeForm']/table/tbody/tr[3]/td//label[text()='Pending']");
+ $this->select2('pledge_status_id', 'Pending', TRUE);
+ $this->select2('pledge_payment_status_id', 'Pending', TRUE);
// fill pledge amount range
$this->type("pledge_amount_low", "100");
$this->type("pledge_amount_high", "300");
- // fill plegde status
- $this->click("xpath=//div[@id='pledgeForm']/table/tbody/tr[4]/td[2]//label[text()='Completed']");
- $this->click("xpath=//div[@id='pledgeForm']/table/tbody/tr[4]/td[2]//label[text()='Pending']");
// fill pledge created date range
$this->webtestFillDate("pledge_create_date_low", "-5 day");
$this->webtestFillDate("pledge_create_date_high", "+5 day");
$this->type("external_identifier", "extid$firstName");
// --- fill few value in Constituent information
- $this->click("customData1");
+ $this->click("customData");
$this->waitForElementPresent("custom_3_-1");
$this->click("CIVICRM_QFID_Edu_2");
// --- fill few values in demographics
$this->click("//form[@id='Contact']/div[2]/div[7]/div[1]");
$this->waitForElementPresent("is_deceased");
- $this->click("civicrm_gender_Male_2");
+ $this->click("CIVICRM_QFID_2_gender_id");
$this->webtestFillDate("birth_date", "-1 year");
$this->click("is_deceased");
}
public function testWithDifferentSubject() {
- $this->markTestSkipped('Skipping for now as it works fine locally.');
$this->webtestLogin();
//----do create test mailing group
}
public function testWithDifferentFrom() {
- $this->markTestSkipped('Skipping for now as it works fine locally.');
$this->webtestLogin();
//----do create test mailing group
$this->waitForElementPresent("xpath=//div[@id='s2id_crmUiId_20']");
// choose form email address for A
- $this->select2("s2id_crmUiId_20", $aEmailID);
+ $this->select("crmUiId_20", "value=$aEmailID");
// choose form email address for B
- $this->select2("s2id_crmUiId_21", $bEmailID);
+ $this->select("crmUiId_21", "value=$bEmailID");
// HTML format message
$HTMLMessage = "This is HTML formatted content for Mailing {$MailingSubject} Webtest.";
}
public function testWithDifferentABMailing() {
- $this->markTestSkipped('Skipping for now as it works fine locally.');
$this->webtestLogin();
//----do create test mailing group
* @param null $msgTitle
*/
public function testTemplateAdd($useTokens = FALSE, $msgTitle = NULL) {
- $this->markTestSkipped('Skipping for now as it works fine locally.');
$this->webtestLogin();
$this->openCiviPage("admin/messageTemplates/add", "action=add&reset=1");
}
public function testAddMailingWithMessageTemplate() {
- $this->markTestSkipped('Skipping for now as it works fine locally.');
// Call the above test to set up our environment
$msgTitle = 'msg_' . substr(sha1(rand()), 0, 7);
$this->testTemplateAdd(TRUE, $msgTitle);
$this->waitForElementPresent("xpath=//form[@id='Search']/div[3]/div/div[2]/table[@class='selector row-highlight']/tbody/tr[2]/td[9]/span/a[1][text()='View']");
$this->click("xpath=//form[@id='Search']/div[3]/div/div[2]/table[@class='selector row-highlight']/tbody/tr[2]/td[9]/span/a[1][text()='View']");
$this->waitForElementPresent("xpath=//div[@class='ui-dialog-buttonset']/button/span[2]");
- $this->assertElementContainsText('help', "Bulk Email Sent.", "Status message didn't show up after saving!");
+ $this->assertElementContainsText("xpath=//div[@class='help']", "Bulk Email Sent.", "Status message didn't show up after saving!");
}
}