Source
'error' => 'User group "Selenium user group in configuration" is used in configuration for database down messages.'
<?php
/*
** Zabbix
** 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 General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
require_once dirname(__FILE__).'/../include/CLegacyWebTest.php';
/**
* @backup usrgrp
* @dataSource LoginUsers
*/
class testFormAdministrationUserGroups extends CLegacyWebTest {
private $userGroup = 'Selenium user group';
public function testFormAdministrationUserGroups_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.'
]
],
[
[