Source
$this->assertEquals(0, CDBHelper::getCount('SELECT null FROM slideshows WHERE slideshowid='.$slideshow['slideshowid']));
<?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';
require_once dirname(__FILE__).'/../../include/items.inc.php';
use Facebook\WebDriver\WebDriverBy;
/**
* @backup slideshows
*/
class testFormSlideshow extends CLegacyWebTest {
// Returns layout data
public static function formData() {
return [
[
['name' => sprintf('Test Slideshow %s', time()), 'delay' => '30s']
]
];
}
/**
* @dataProvider formData
*/
public function testFormSlideshow_Create($data) {
// Log in.
$this->zbxTestLogin('slideconf.php?config=slides.php&form=Create+slide+show');
// Test page title.
$this->zbxTestCheckTitle('Configuration of slide shows');
$this->zbxTestCheckHeader('Slide shows');
// Fill out the form.
$this->zbxTestInputTypeWait('name', $data['name']);
$this->zbxTestInputTypeOverwrite('delay', $data['delay']);
// Select slides clicking on the first link that appears in popup window.
$this->zbxTestClick('add');
$this->zbxTestLaunchOverlayDialog('Screens');
$this->zbxTestClickLinkTextWait('Zabbix server');
/**
* Click on submit button.
* Full XPath required because there are multiple [id="add"] elements.
*/
$this->zbxTestClickXpathWait("//button[@id='add'][@type='submit']");