<?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 testAddCase() {
+ public function testAddCase() {
$this->webtestLogin('admin');
// Enable CiviCase module if necessary
$cusId_3 = 'custom_' . $customId[2] . '_-1';
// let's give full CiviCase permissions.
- $permission = array('edit-2-access-all-cases-and-activities', 'edit-2-access-my-cases-and-activities', 'edit-2-administer-civicase', 'edit-2-delete-in-civicase');
+ $permission = array(
+ 'edit-2-access-all-cases-and-activities',
+ 'edit-2-access-my-cases-and-activities',
+ 'edit-2-administer-civicase',
+ 'edit-2-delete-in-civicase',
+ );
$this->changePermissions($permission);
// Log in as normal user
"Priority" => "Normal",
);
$this->webtestVerifyTabularData($openCaseData);
- $this->click("xpath=//span[@class='ui-button-icon-primary ui-icon ui-icon-closethick']");
+ $this->click("xpath=//span[@class='ui-button-icon-primary ui-icon fa-times']");
// verify if custom data is present
$this->openCiviPage('case', 'reset=1');
*
* @return array
*/
- function _testGetCustomFieldId($customGrpId1, $noteRichEditor=FALSE) {
+ public function _testGetCustomFieldId($customGrpId1, $noteRichEditor = FALSE) {
$customId = array();
$this->openCiviPage('admin/custom/group/field/add', array('reset' => 1, 'action' => 'add', 'gid' => $customGrpId1));
$this->clickLink("_qf_Field_next_new-bottom");
// get id of custom fields
- $this->openCiviPage("admin/custom/group/field", array('reset' => 1, 'action' => 'browse', 'gid' => $customGrpId1));
+ $this->openCiviPage("admin/custom/group/field", array(
+ 'reset' => 1,
+ 'action' => 'browse',
+ 'gid' => $customGrpId1,
+ ));
$custom1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr[1]/td[8]/span/a[text()='Edit Field']/@href"));
$custom1 = $custom1[1];
array_push($customId, $custom1);
$this->clickLink("_qf_Field_done-bottom");
// get id of custom fields
- $this->openCiviPage("admin/custom/group/field", array('reset' => 1, 'action' => 'browse', 'gid' => $customGrpId1));
+ $this->openCiviPage("admin/custom/group/field", array(
+ 'reset' => 1,
+ 'action' => 'browse',
+ 'gid' => $customGrpId1,
+ ));
$custom1 = explode('&id=', $this->getAttribute("xpath=//div[@id='field_page']//table/tbody//tr[1]/td[8]/span/a[text()='Edit Field']/@href"));
$custom1 = $custom1[1];
array_push($customId, $custom1);
/**
* @param $customGrpId1
- * @param $customId
+ * @param array $customId
*/
- function _testDeleteCustomData($customGrpId1, $customId) {
+ public function _testDeleteCustomData($customGrpId1, $customId) {
// delete all custom data
foreach ($customId as $cKey => $cValue) {
- $this->openCiviPage("admin/custom/group/field", array('action' => 'delete', 'reset' => '1', 'gid' => $customGrpId1, 'id' => $cValue));
+ $this->openCiviPage("admin/custom/group/field", array(
+ 'action' => 'delete',
+ 'reset' => '1',
+ 'gid' => $customGrpId1,
+ 'id' => $cValue,
+ ));
$this->clickLink("_qf_DeleteField_next-bottom");
}
/**
* CRM-12812
*/
- function testCaseCustomNoteRichEditor() {
+ public function testCaseCustomNoteRichEditor() {
$this->webtestLogin('admin');
//setting ckeditor as WYSIWYG
$cusId_2 = 'custom_' . $customId[1] . '_-1';
// let's give full CiviCase permissions.
- $permission = array('edit-2-access-all-cases-and-activities', 'edit-2-access-my-cases-and-activities', 'edit-2-administer-civicase', 'edit-2-delete-in-civicase');
+ $permission = array(
+ 'edit-2-access-all-cases-and-activities',
+ 'edit-2-access-my-cases-and-activities',
+ 'edit-2-administer-civicase',
+ 'edit-2-delete-in-civicase',
+ );
$this->changePermissions($permission);
// Log in as normal user
}
/**
- * @param $customId
- * @param $custFname
- * @param $custMname
+ * @param int $customId
+ * @param string $custFname
+ * @param string $custMname
* @param $custLname
*/
- function _testAdvansearchCaseData($customId, $custFname, $custMname, $custLname) {
+ public function _testAdvansearchCaseData($customId, $custFname, $custMname, $custLname) {
// search casecontact
$this->openCiviPage('contact/search/advanced', 'reset=1', '_qf_Advanced_refresh');
$this->click("CiviCase");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->assertElementContainsText('crm-container', '1 Contact');
}
-}
+}