'ZBX6648 All Triggers Host', 'hostgroup' => 'ZBX6648 All Triggers', 'triggers' => 'both' ] ], [ [ 'host' => 'ZBX6648 Enabled Triggers Host', 'hostgroup' => 'ZBX6648 Enabled Triggers', 'triggers' => 'enabled' ] ], [ [ 'hostgroup' => 'ZBX6648 Disabled Triggers', 'triggers' => 'disabled' ] ], [ [ 'host' => 'Test item host', 'hostgroup' => 'Zabbix servers', 'triggers' => 'no triggers' ] ], [ [ 'hostgroup' => 'ZBX6648 Group No Hosts', 'triggers' => 'no hosts' ] ] ]; } /** * @dataProvider zbx_data */ public function testZBX6648_eventFilter($zbx_data) { CMultiselectElement::setDefaultFillMode(CMultiselectElement::MODE_SELECT); $this->zbxTestLogin('zabbix.php?action=problem.view'); $this->zbxTestClickButtonMultiselect('triggerids_0'); $this->zbxTestLaunchOverlayDialog('Triggers'); switch ($zbx_data['triggers']) { case 'both' : case 'enabled' : $host = COverlayDialogElement::find()->one()->waitUntilReady()->query('class:multiselect-control') ->asMultiselect()->one()->waitUntilVisible(); $host->fill([ 'values' => $zbx_data['host'], 'context' => $zbx_data['hostgroup'] ]); $this->zbxTestLaunchOverlayDialog('Triggers'); break; case 'disabled' : case 'no hosts' : COverlayDialogElement::find()->one()->query('class:multiselect-button')->one()->click(); $this->zbxTestLaunchOverlayDialog('Hosts'); COverlayDialogElement::find()->all()->last()->query('class:multiselect-button')->one()->click(); $this->zbxTestLaunchOverlayDialog('Host groups'); $this->zbxTestAssertElementNotPresentXpath('//a[text()="'.$zbx_data['hostgroup'].'"]'); break; case 'no triggers' : COverlayDialogElement::find()->one()->waitUntilReady()->query('class:multiselect-button')->one()->click(); COverlayDialogElement::find()->all()->last()->waitUntilReady()->setDataContext($zbx_data['hostgroup']); $this->zbxTestLaunchOverlayDialog('Hosts'); $this->zbxTestAssertElementNotPresentXpath('//a[text()="'.$zbx_data['host'].'"]'); break; } } }