<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| 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 testCustomSameFieldAdd() {
+ public function testCustomSameFieldAdd() {
$this->open($this->sboxPath);
$this->webtestLogin();
$this->_testCustomAdd();
}
- function _testCustomAdd() {
+ public function _testCustomAdd() {
//CRM-7564 : Different gropus can contain same custom fields
$this->open($this->sboxPath . "civicrm/admin/custom/group?action=add&reset=1");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->openCiviPage('admin/custom/group/field/add', "reset=1&action=add&gid=$gid");
$textFieldLabel = 'test_text_field';
$this->click("header");
+ $this->waitForElementPresent('label');
$this->type("label", $textFieldLabel);
$this->click("_qf_Field_next_new-bottom");
$this->waitForPageToLoad($this->getTimeoutMsec());
$this->click("//option[@value='CheckBox']");
$checkboxFieldLabel = 'test_checkbox';
+ $this->waitForElementPresent('label');
$this->type("label", $checkboxFieldLabel);
$checkboxOptionLabel1 = 'check1';
$this->type("option_label_1", $checkboxOptionLabel1);
//add custom field - alphanumeric text
$textFieldLabel = 'test_text_field';
$this->click("header");
+ $this->waitForElementPresent('label');
$this->type("label", $textFieldLabel);
$this->clickLink("_qf_Field_next_new-bottom");
$this->click("//option[@value='Radio']");
$radioFieldLabel = 'test_radio';
+ $this->waitForElementPresent('label');
$this->type("label", $radioFieldLabel);
$radioOptionLabel1 = 'radio1';
$this->type("option_label_1", $radioOptionLabel1);
$this->waitForText('crm-notification-container', "Custom field '$radioFieldLabel' has been saved.");
}
-}
+}