Source
xxxxxxxxxx
$this->query(($update ? 'link:'.self::$update_group : 'button:Create proxy group'))->one()->waitUntilClickable()->click();
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
require_once dirname(__FILE__) . '/../../include/CWebTest.php';
require_once dirname(__FILE__).'/../../include/helpers/CDataHelper.php';
/**
* Test for checking Proxy group form.
*
* @dataSource Proxies
*
* @backup proxy
*/
class testFormAdministrationProxyGroups extends CWebTest {
CONST SQL = 'SELECT * FROM proxy_group pg LEFT JOIN proxy_group_rtdata pgr ON pgr.proxy_groupid = pg.proxy_groupid';
CONST CLONE_GROUP = '⭐️😀⭐Smiley प्रॉक्सी 团体⭐️😀⭐ - unknown';
protected static $update_group = '2nd Online proxy group';
/**
* Attach MessageBehavior to the test.
*
* @return array
*/
public function getBehaviors() {
return [CMessageBehavior::class];
}
public function testFormAdministrationProxyGroups_Layout() {
$this->page->login()->open('zabbix.php?action=proxygroup.list')->waitUntilReady();
// Open proxy group configuration form in create mode and check layout.
$this->query('button:Create proxy group')->one()->waitUntilClickable()->click();
$dialog = COverlayDialogElement::find()->one()->waitUntilReady();
$this->assertEquals('New proxy group', $dialog->getTitle());
$form = $this->query('id:proxy-group-form')->asForm()->one();
// Check that proxies field is not displayed in new proxy group configuration form.
$this->assertEquals(['Name', 'Failover period', 'Minimum number of proxies', 'Description'],
$form->getLabels()->asText()
);
// Check length, default values of form fields and if they are mandatory or not.
$field_params = [
'Name' => [
'maxlength' => 255,
'mandatory' => true,
'value' => ''
],