Source
xxxxxxxxxx
$this->query('class:list-table')->asTable()->one()->query('link', $data['trigger'])->one()->click();
<?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__).'/../../include/CWebTest.php';
/**
* Test checks link from trigger URL field on different pages.
*
* @onBefore prepareTriggerData
*
* @backup profiles, problem
*/
class testPageTriggerUrl extends CWebTest {
private static $custom_name = 'URL name for menu';
/**
* Add URL name for trigger.
*/
public function prepareTriggerData() {
$response = CDataHelper::call('trigger.update', [
[
'triggerid' => '100032',
'url_name' => 'URL name for menu'
]
]);
}
public function getTriggerLinkData() {
return [
[
[
'trigger' => '1_trigger_High',
'links' => [
'Problems' => 'zabbix.php?action=problem.view&filter_set=1&triggerids%5B%5D=100035',
'History' => ['1_item' => 'history.php?action=showgraph&itemids%5B%5D=99086'],
'Trigger' => 'menu-popup-item',
'Items' => ['1_item' => 'menu-popup-item'],
'Mark as cause' => '',
'Mark selected as symptoms' => '',
'Trigger URL' => 'menu-popup-item',
'Unique webhook url' => 'menu-popup-item',
'Webhook url for all' => 'menu-popup-item'
],
'expected_url' => 'tr_events.php?triggerid=100035&eventid=9003',
'background' => "high-bg"
]
],
[
[