Source
'error' => 'User group "Selenium user group in configuration" is used in configuration for database down messages.'
<?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/CLegacyWebTest.php';
/**
* @backup usrgrp
*
* @dataSource LoginUsers
*/
class testFormUserGroups extends CLegacyWebTest {
private $userGroup = 'Selenium user group';
public function testFormUserGroups_CheckLayout() {
$this->zbxTestLogin('zabbix.php?action=usergroup.list');
$this->zbxTestClickButtonText('Create user group');
$this->zbxTestCheckTitle('Configuration of user groups');
$this->zbxTestCheckHeader('User groups');
$this->zbxTestTextPresent(['Group name', 'Users', 'Frontend access', 'Enabled', 'Debug mode']);
$this->zbxTestAssertAttribute('//input[@id="name"]', 'maxlength', '64');
$this->zbxTestDropdownHasOptions('gui_access', ['System default', 'Internal', 'LDAP', 'Disabled']);
$this->zbxTestDropdownAssertSelected('gui_access', 'System default');
$this->zbxTestCheckboxSelected('users_status');
}
public static function create() {
return [
[
[
'expected' => TEST_BAD,
'name' => '',
'error_msg' => 'Cannot add user group',
'error' => 'Incorrect value for field "name": cannot be empty.'
]
],
[
[
'expected' => TEST_BAD,
'name' => 'Zabbix administrators',
'error_msg' => 'Cannot add user group',
'error' => 'User group "Zabbix administrators" already exists.'
]
],
[
[
'expected' => TEST_BAD,
'name' => 'Selenium test add admin in disabled group',
'user_group' => 'Zabbix administrators',