$this->assertEquals(1, CDBHelper::getCount($sql), 'Chuck Norris: "Dark" theme can not be selected as default theme: it does not exist in the DB');
require_once dirname(__FILE__).'/../include/CLegacyWebTest.php';
class testFormAdministrationGeneralGUI extends CLegacyWebTest {
public static function allValues() {
return CDBHelper::getDataProvider(
'SELECT default_theme,search_limit,max_in_table,server_check_interval'.
public function testFormAdministrationGeneralGUI_CheckLayout($allValues) {
$this->zbxTestLogin('zabbix.php?action=gui.edit');
$this->query('id:page-title-general')->asPopupButton()->one()->select('GUI');
$this->zbxTestCheckTitle('Configuration of GUI');
$this->zbxTestCheckHeader('GUI');
$this->zbxTestTextPresent([
'Limit for search and filter results',
'Max count of elements to show inside table cell',
'Show warning if Zabbix server is down'
$this->zbxTestDropdownHasOptions('default_theme', ['Blue', 'Dark']);
$this->zbxTestAssertElementPresentId('search_limit');
$this->zbxTestAssertAttribute('//input[@id="search_limit"]', 'maxlength', '6');
$this->zbxTestAssertElementPresentId('max_in_table');
$this->zbxTestAssertAttribute('//input[@id="max_in_table"]','maxlength', '5');
$this->zbxTestAssertElementPresentId('server_check_interval');
$this->zbxTestAssertElementPresentId('update');
$this->assertEquals($allValues['default_theme'], $this->zbxTestGetValue('//z-select[@name="default_theme"]'));