Source
$sqlTriggers = "select triggerid,expression,description,url,status,value,priority,comments,error,templateid,type,state,flags from triggers order by triggerid";
<?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';
require_once dirname(__FILE__).'/behaviors/CTableBehavior.php';
require_once dirname(__FILE__).'/behaviors/CTagBehavior.php';
/**
* @backup profiles
*
* @dataSource TagFilter, WebScenarios
*/
class testPageTemplates extends CLegacyWebTest {
/**
* Attach TagBehavior and TableBehavior to the test.
*
* @return array
*/
public function getBehaviors() {
return [
CTableBehavior::class,
CTagBehavior::class
];
}
public $templateName = 'Huawei OceanStor 5300 V5 by SNMP';
public static function allTemplates() {
return CDBHelper::getRandomizedDataProvider(
'SELECT * FROM hosts WHERE status IN ('.HOST_STATUS_TEMPLATE.')', 25
);
}
public function testPageTemplates_CheckLayout() {
$this->zbxTestLogin('templates.php');
$this->zbxTestCheckTitle('Configuration of templates');
$this->zbxTestCheckHeader('Templates');
$table = $this->query('class:list-table')->asTable()->one();
$filter = $this->query('name:zbx_filter')->asForm()->one();
$filter->getField('Host groups')->select('Templates/SAN');
$filter->submit();
$table->waitUntilReloaded();
$this->zbxTestTextPresent($this->templateName);
$headers = ['', 'Name', 'Hosts', 'Items', 'Triggers', 'Graphs', 'Dashboards', 'Discovery', 'Web',