<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
parent::setUp();
}
- function testCreateCampaign() {
+ public function testCreateCampaign() {
$this->webtestLogin('admin');
// Enable CiviCampaign module if necessary
$this->waitForText('crm-notification-container', "Campaign $title");
- $this->waitForElementPresent("xpath=//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td[3][text()='{$campaignTitle}']/../td[1]");
- $id = (int) $this->getText("xpath=//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td[3][text()='{$campaignTitle}']/../td[1]");
+ $this->waitForElementPresent("xpath=//div[@id='campaignList']/div/table/tbody//tr/td[3]/div[text()='{$campaignTitle}']/../../td[1]");
+ $id = (int) $this->getText("xpath=//div[@id='campaignList']/div/table/tbody//tr/td[3]/div[text()='{$campaignTitle}']/../../td[1]");
$this->activityAddTest($campaignTitle, $id);
}
* @param $campaignTitle
* @param int $id
*/
- function activityAddTest($campaignTitle, $id) {
+ public function activityAddTest($campaignTitle, $id) {
// Adding Adding contact with randomized first name for test testContactContextActivityAdd
// We're using Quick Add block on the main page for this.
$firstName1 = substr(sha1(rand()), 0, 7);
$this->type("followup_activity_subject", "This is subject of schedule follow-up activity");
// Clicking save.
- $this->clickLink("_qf_Activity_upload",'link=View',FALSE);
+ $this->clickLink("_qf_Activity_upload", 'link=View', FALSE);
// Is status message correct?
$this->waitForText('crm-notification-container', $subject);
- $this->waitForElementPresent("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody/tr[1]/td[8]/span/a[text()='View']");
+ $this->waitForElementPresent("xpath=//div[@class='dataTables_wrapper no-footer']/table/tbody/tr[1]/td[8]/span/a[1][text()='View']");
// click through to the Activity view screen
$this->click("xpath=//table[@class='contact-activity-selector-activity dataTable no-footer']/tbody//tr[2]/td[8]/span/a[text()='View']");
$this->verifyText("xpath=//form[@id='Activity']/div[2]/table/tbody/tr[5]/td[2]/span", $campaignTitle);
}
}
-