Source
$this->assertTableDataColumn(($sort === 'asc') ? $data['expected'] : array_reverse($data['expected']), 'Service');
<?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/testSlaReport.php';
/**
* @backup profiles
*
* @dataSource Services, Sla
*
* @onBefore getDateTimeData
*/
class testPageServicesSlaReport extends testSlaReport {
public function testPageServicesSlaReport_GeneralLayout() {
$this->page->login()->open('zabbix.php?action=slareport.list');
$this->page->assertHeader('SLA report');
$this->page->assertTitle('SLA report');
// Check status of buttons on the SLA report page.
foreach ($this->query('button', ['Apply', 'Reset'])->all() as $button) {
$this->assertTrue($button->isClickable());
}
// Check displaying and hiding the filter.
$filter = CFilterElement::find()->one();
$filter_form = $filter->getForm();
$this->assertEquals('Filter', $filter->getSelectedTabName());
// Check that filter is expanded by default.
$this->assertTrue($filter->isExpanded());
// Check that filter is collapsing/expanding on click.
foreach ([false, true] as $status) {
$filter->expand($status);
$this->assertTrue($filter->isExpanded($status));
}
// Check the list of available SLAs (disabled SLAs should not be present).
$sla_data = [
'field' => 'SLA',
'headers' => ['Name'],
'column_data' => [
'Name' => [
'SLA Annual',
'SLA Daily',
'SLA Monthly',
'SLA Quarterly',
'SLA Weekly',
'SLA with schedule and downtime',
'SLA для удаления - 頑張って', 'Update SLA'