Source
$this->page->login()->open(($data['object'] === 'Hosts') ? 'zabbix.php?action=host.list' : 'zabbix.php?action=template.list');
<?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__).'/../common/testMultiselectDialogs.php';
/**
* Test for assuring that bug from ZBX-23302 is not reproducing, respectively
* that multiselects' dialogs do not contain any errors before and after filling.
*
* @onBefore prepareProxyData
*
* @backup hosts
*/
class testMultiselectsErrorsHostsTemplates extends testMultiselectDialogs {
const HOST = 'Template inheritance test host';
const TEMPLATE = 'AIX by Zabbix agent';
public static function prepareProxyData() {
CDataHelper::call('proxy.create',
[
[
'name' => 'Proxy for Multiselects test',
'operating_mode' => PROXY_OPERATING_MODE_ACTIVE
]
]
);
}
public static function getCheckDialogsData() {
return [
// #0.
[
[
'object' => 'Hosts',
'checked_multiselects' => [
['Host groups' => ['title' => 'Host groups']],
['Templates' => ['title' => 'Templates'], 'Template group' => ['title' =>'Template groups']],
['Proxies' => ['title' => 'Proxies']]
],
// Fill this filter to enable 'Proxy' multiselect.
'filter' => ['Monitored by' => 'Proxy'],
'filled_multiselects' => [
['Proxy' => 'Proxy for Multiselects test']
]
]
],
// #1.
[
[