Source
$this->zbxTestWaitUntilElementPresent(WebDriverBy::xpath('//table[@class="list-table"][not(@id="'.$tabel_id.'")]'));
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 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';
use Facebook\WebDriver\WebDriverBy;
class testPageReportsTriggerTop extends CLegacyWebTest {
public function testPageReportsTriggerTop_FilterLayout() {
$this->zbxTestLogin('toptriggers.php');
$this->zbxTestCheckTitle('100 busiest triggers');
$this->zbxTestCheckHeader('100 busiest triggers');
$this->zbxTestExpandFilterTab('Filter');
$this->zbxTestTextPresent('Host groups', 'Hosts', 'Severity', 'Filter', 'From', 'Till');
$this->zbxTestClickXpathWait('//button[text()="Reset"]');
// Check unselected severities
$severities = ['Not classified', 'Warning', 'High', 'Information', 'Average', 'Disaster'];
foreach ($severities as $severity) {
$severity_id = $this->zbxTestGetAttributeValue('//label[text()=\''.$severity.'\']', 'for');
$this->assertTrue($this->query('id', $severity_id)->waitUntilPresent()->one()->isSelected(false));
}
// Check closed filter
$this->zbxTestClickXpathWait('//a[contains(@class,\'filter-trigger\')]');
$this->zbxTestAssertNotVisibleId('groupids_');
// Check opened filter
$this->zbxTestClickXpathWait('//a[contains(@class,\'filter-trigger\')]');
$this->zbxTestAssertVisibleId('groupids_');
}
public static function getFilterData() {
return [
[
[
'filter' => [
'host_group' => 'Zabbix servers'
],
'date' => [
'from' => '2020-10-23 00:00',
'to' => 'now/d'
],
'result' => [
'Test trigger to check tag filter on problem page',