<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
require_once 'CiviTest/CiviSeleniumTestCase.php';
parent::setUp();
}
- function testCreateCampaign() {
+ public function testCreateCampaign() {
// Fixme: testing a theory that this test was failing due to permissions
$this->webtestLogin('admin');
$this->waitForText('crm-notification-container', "Campaign $title");
//Opening Edit Page of the created Campaign
- $this->waitForElementPresent("//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td[text()='{$campaignTitle}']/../td[13]/span/a[text()='Edit']");
- $this->clickLink("//div[@id='campaignList']/div[@class='dataTables_wrapper no-footer']/table/tbody//tr/td[text()='{$campaignTitle}']/../td[13]/span/a[text()='Edit']", "//textarea[@id='description']");
- $fetchedVaue = $this->getValue('description');
- $this->assertEquals($campaignDescription, $fetchedVaue);
+ $this->waitForElementPresent("//div[@id='campaignList']/div/table/tbody//tr/td[3]/div[text()='{$campaignTitle}']/../../td[13]/span/a[1][text()='Edit']");
+ $this->clickLink("//div[@id='campaignList']/div/table/tbody//tr/td[3]/div[text()='{$campaignTitle}']/../../td[13]/span/a[1][text()='Edit']", "//textarea[@id='description']", FALSE);
+ $this->assertTrue($this->isTextPresent($campaignDescription), 'Missing text: ' . $campaignDescription);
}
- function testAjaxCustomGroupLoad() {
+ public function testAjaxCustomGroupLoad() {
$this->webtestLogin();
$this->enableComponents(array('CiviCampaign'));
$triggerElement = array('name' => 'campaign_type_id', 'type' => 'select');
$customSets = array(
array('entity' => 'Campaign', 'subEntity' => 'Referral Program', 'triggerElement' => $triggerElement),
- array('entity' => 'Campaign', 'subEntity' => 'Constituent Engagement', 'triggerElement' => $triggerElement)
+ array('entity' => 'Campaign', 'subEntity' => 'Constituent Engagement', 'triggerElement' => $triggerElement),
);
$pageUrl = array('url' => 'campaign/add', 'args' => 'reset=1');
$this->customFieldSetLoadOnTheFlyCheck($customSets, $pageUrl);
}
+
}