<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | 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() {
$this->webtestLogin('admin');
// Create new group
$this->checkCRMAlert("Campaign $title");
- $this->waitForElementPresent("//td[text()='$campaignTitle']");
- $campaignId = $this->urlArg('id', $this->getAttribute("//td[text()='$campaignTitle']/../td[13]/span/a[text()='Edit']@href"));
+ $this->waitForElementPresent("//td[3]/div[text()='$campaignTitle']");
+ $campaignId = $this->urlArg('id', $this->getAttribute("//td[3]/div[text()='$campaignTitle']/../../td[13]/span/a[text()='Edit']@href"));
$this->offlineContributionTest($campaignTitle, $campaignId);
/**
* @param $campaignTitle
- * @param $id
+ * @param int $id
* @param bool $past
*/
- function offlineContributionTest($campaignTitle, $id, $past = FALSE) {
+ public function offlineContributionTest($campaignTitle, $id, $past = FALSE) {
// Create a contact to be used as soft creditor
$softCreditFname = substr(sha1(rand()), 0, 7);
$softCreditLname = substr(sha1(rand()), 0, 7);
$this->type("invoice_id", time());
$this->webtestFillDate('thankyou_date');
-
//Premium section
$this->click("Premium");
$this->waitForElementPresent("fulfilled_date");
}
/**
- * @param $groupName
+ * @param string $groupName
*/
- function pastCampaignsTest($groupName) {
+ public function pastCampaignsTest($groupName) {
$this->openCiviPage('campaign/add', 'reset=1', '_qf_Campaign_upload-bottom');
$pastTitle = substr(sha1(rand()), 0, 7);
$this->waitForElementPresent("link=Campaigns");
$this->click("search_form_campaign");
$this->type("campaign_title", $pastCampaignTitle);
- $this->clickAjaxLink("//a[text()='Search']", "//td[text()='$pastCampaignTitle']");
- $campaignId = $this->urlArg('id', $this->getAttribute("//td[text()='$pastCampaignTitle']/../td[13]/span/a[text()='Edit']@href"));
+ $this->clickAjaxLink("//a[text()='Search']", "//td[3]/div[text()='$pastCampaignTitle']");
+ $campaignId = $this->urlArg('id', $this->getAttribute("//td[3]/div[text()='$pastCampaignTitle']/../../td[13]/span/a[text()='Edit']@href"));
$this->offlineContributionTest($pastCampaignTitle, $campaignId, TRUE);
}
-}
+}