require_once dirname(__FILE__).'/../include/CLegacyWebTest.php';
class testFormAdministrationGeneralHousekeeper extends CLegacyWebTest {
public function testFormAdministrationGeneralHousekeeper_CheckLayout() {
$this->zbxTestLogin('zabbix.php?action=housekeeping.edit');
$this->zbxTestCheckTitle('Configuration of housekeeping');
$this->zbxTestCheckHeader('Housekeeping');
$this->zbxTestTextPresent('Events and alerts');
$this->zbxTestTextPresent('Enable internal housekeeping');
$this->zbxTestAssertElementPresentId('hk_events_mode');
$this->assertTrue($this->zbxTestCheckboxSelected('hk_events_mode'));
$this->zbxTestTextPresent('Trigger data storage period');
$this->zbxTestAssertElementPresentId('hk_events_trigger');
$this->zbxTestAssertAttribute("//input[@id='hk_events_trigger']", "maxlength", 255);
$this->zbxTestAssertAttribute("//input[@id='hk_events_trigger']", "value", '365d');
$this->zbxTestAssertElementNotPresentXpath("//input[@id='hk_events_trigger'][@disabled]");
$this->zbxTestTextPresent('Internal data storage period');
$this->zbxTestAssertElementPresentId('hk_events_internal');
$this->zbxTestAssertAttribute("//input[@id='hk_events_internal']", "maxlength", 255);
$this->zbxTestAssertAttribute("//input[@id='hk_events_internal']", "value", '1d');
$this->zbxTestAssertElementNotPresentXpath("//input[@id='hk_events_internal'][@disabled]");
$this->zbxTestTextPresent('Network discovery data storage period');
$this->zbxTestAssertElementPresentId('hk_events_discovery');
$this->zbxTestAssertAttribute("//input[@id='hk_events_discovery']", "maxlength", 255);
$this->zbxTestAssertAttribute("//input[@id='hk_events_discovery']", "value", '1d');
$this->zbxTestAssertElementNotPresentXpath("//input[@id='hk_events_discovery'][@disabled]");
$this->zbxTestTextPresent('Autoregistration data storage period');
$this->zbxTestAssertElementPresentId('hk_events_autoreg');
$this->zbxTestAssertAttribute("//input[@id='hk_events_autoreg']", "maxlength", 255);
$this->zbxTestAssertAttribute("//input[@id='hk_events_autoreg']", "value", '1d');
$this->zbxTestAssertElementNotPresentXpath("//input[@id='hk_events_autoreg'][@disabled]");
$this->zbxTestCheckboxSelect('hk_events_mode', false);
$this->zbxTestAssertElementPresentXpath("//input[@id='hk_events_trigger'][@disabled]");