diff options
Diffstat (limited to 'ui/tests/selenium/common/testMassUpdateItems.php')
-rw-r--r-- | ui/tests/selenium/common/testMassUpdateItems.php | 141 |
1 files changed, 65 insertions, 76 deletions
diff --git a/ui/tests/selenium/common/testMassUpdateItems.php b/ui/tests/selenium/common/testMassUpdateItems.php index a3b9c6790ef..c41f87b3816 100644 --- a/ui/tests/selenium/common/testMassUpdateItems.php +++ b/ui/tests/selenium/common/testMassUpdateItems.php @@ -111,7 +111,7 @@ class testMassUpdateItems extends CWebTest{ 'change' => [ 'Type' => ['id' => 'type', 'value' => 'SNMP agent'] ], - 'details' => 'Item uses incorrect interface type.' + 'details' => 'Invalid parameter "/1/snmp_oid": cannot be empty.' ] ], [ @@ -124,7 +124,7 @@ class testMassUpdateItems extends CWebTest{ 'change' => [ 'Type' => ['id' => 'type', 'value' => 'TELNET agent'] ], - 'details' => 'No authentication user name specified.' + 'details' => 'Invalid parameter "/2/username": cannot be empty.' ] ], [ @@ -138,7 +138,7 @@ class testMassUpdateItems extends CWebTest{ 'Type' => ['id' => 'type', 'value' => 'TELNET agent'], 'Host interface' => ['id' => 'interface-select', 'value' => '127.0.5.1:10051'] ], - 'details' => 'No authentication user name specified.' + 'details' => 'Invalid parameter "/1/username": cannot be empty.' ] ], [ @@ -153,7 +153,7 @@ class testMassUpdateItems extends CWebTest{ 'Authentication method' => ['id' => 'authtype', 'value' => 'Password'], 'User name' => ['id' => 'username', 'value' => ''] ], - 'details' => 'No authentication user name specified.' + 'details' => 'Invalid parameter "/1/username": cannot be empty.' ] ], [ @@ -170,7 +170,7 @@ class testMassUpdateItems extends CWebTest{ 'Public key file' => ['id' => 'publickey', 'value' => '/path/file1'], 'Private key file' => ['id' => 'privatekey', 'value' => '/path/file2'] ], - 'details' => 'No authentication user name specified.' + 'details' => 'Invalid parameter "/1/username": cannot be empty.' ] ], [ @@ -187,7 +187,7 @@ class testMassUpdateItems extends CWebTest{ 'Public key file' => ['id' => 'publickey', 'value' => ''], 'Private key file' => ['id' => 'privatekey', 'value' => '/path/file2'] ], - 'details' => 'No public key file specified.' + 'details' => 'Invalid parameter "/1/publickey": cannot be empty.' ] ], [ @@ -204,7 +204,7 @@ class testMassUpdateItems extends CWebTest{ 'Public key file' => ['id' => 'publickey', 'value' => '/path/file1'], 'Private key file' => ['id' => 'privatekey', 'value' => ''] ], - 'details' => 'No private key file specified.' + 'details' => 'Invalid parameter "/1/privatekey": cannot be empty.' ] ], [ @@ -222,7 +222,7 @@ class testMassUpdateItems extends CWebTest{ 'input' => ['id' => 'history', 'value' => '3599'] ] ], - 'details' => 'Incorrect value for field "history": value must be one of 0, 3600-788400000.' + 'details' => 'Invalid parameter "/1/history": value must be one of 0, 3600-788400000.' ] ], [ @@ -240,7 +240,7 @@ class testMassUpdateItems extends CWebTest{ 'input' => ['id' => 'history', 'value' => '1'] ] ], - 'details' => 'Incorrect value for field "history": value must be one of 0, 3600-788400000.' + 'details' => 'Invalid parameter "/1/history": value must be one of 0, 3600-788400000.' ] ], [ @@ -258,7 +258,7 @@ class testMassUpdateItems extends CWebTest{ 'input' => ['id' => 'history', 'value' => ''] ] ], - 'details' => 'Incorrect value for field "history": a time unit is expected.' + 'details' => 'Invalid parameter "/1/history": cannot be empty.' ] ], [ @@ -276,7 +276,7 @@ class testMassUpdateItems extends CWebTest{ 'input' => ['id' => 'history', 'value' => '25y'] ] ], - 'details' => 'Incorrect value for field "history": a time unit is expected.' + 'details' => 'Invalid parameter "/1/history": a time unit is expected.' ] ], [ @@ -294,7 +294,7 @@ class testMassUpdateItems extends CWebTest{ 'input' => ['id' => 'trends', 'value' => ''] ] ], - 'details' => 'Incorrect value for field "trends": a time unit is expected.' + 'details' => 'Invalid parameter "/1/trends": cannot be empty.' ] ], [ @@ -312,7 +312,7 @@ class testMassUpdateItems extends CWebTest{ 'input' => ['id' => 'trends', 'value' => '86399'] ] ], - 'details' => 'Incorrect value for field "trends": value must be one of 0, 86400-788400000.' + 'details' => 'Invalid parameter "/1/trends": value must be one of 0, 86400-788400000.' ] ], [ @@ -330,7 +330,7 @@ class testMassUpdateItems extends CWebTest{ 'input' => ['id' => 'trends', 'value' => '1'] ] ], - 'details' => 'Incorrect value for field "trends": value must be one of 0, 86400-788400000.' + 'details' => 'Invalid parameter "/1/trends": value must be one of 0, 86400-788400000.' ] ], [ @@ -348,7 +348,7 @@ class testMassUpdateItems extends CWebTest{ 'input' => ['id' => 'trends', 'value' => '25y'] ] ], - 'details' => 'Incorrect value for field "trends": a time unit is expected.' + 'details' => 'Invalid parameter "/1/trends": a time unit is expected.' ] ], [ @@ -362,7 +362,7 @@ class testMassUpdateItems extends CWebTest{ 'Type' => ['id' => 'type', 'value' => 'Zabbix trapper'], 'Allowed hosts' => ['id' => 'trapper_hosts', 'value' => 'Zabbix server'] ], - 'details' => 'Incorrect value for field "trapper_hosts": invalid address range "Zabbix server".' + 'details' => 'Invalid parameter "/1/trapper_hosts": invalid address range "Zabbix server".' ] ], [ @@ -376,7 +376,7 @@ class testMassUpdateItems extends CWebTest{ 'Type' => ['id' => 'type', 'value' => 'Zabbix agent'], 'Update interval' => ['Delay' => ''] ], - 'details' => 'Incorrect value for field "delay": invalid delay.' + 'details' => 'Invalid parameter "/1/delay": cannot be empty.' ] ], [ @@ -390,8 +390,7 @@ class testMassUpdateItems extends CWebTest{ 'Type' => ['id' => 'type', 'value' => 'Zabbix agent'], 'Update interval' => ['Delay' => '0'] ], - 'details' => 'Item will not be refreshed. Specified update interval requires having at least '. - 'one either flexible or scheduling interval.' + 'details' => 'Invalid parameter "/1/delay": cannot be equal to zero without custom intervals.' ] ], [ @@ -405,8 +404,7 @@ class testMassUpdateItems extends CWebTest{ 'Type' => ['id' => 'type', 'value' => 'Zabbix agent'], 'Update interval' => ['Delay' => '86401'] ], - 'details' => 'Item will not be refreshed. Update interval should be between 1s and 1d. '. - 'Also Scheduled/Flexible intervals can be used.' + 'details' => 'Invalid parameter "/1/delay": value must be one of 0-86400.' ] ], [ @@ -497,7 +495,7 @@ class testMassUpdateItems extends CWebTest{ ] ] ], - 'details' => 'Invalid parameter "headers": nonempty key and value pair expected.' + 'details' => 'Invalid parameter "/1/headers": nonempty key and value pair expected.' ] ], [ @@ -520,7 +518,7 @@ class testMassUpdateItems extends CWebTest{ ] ] ], - 'details' => 'Invalid parameter "headers": nonempty key and value pair expected.' + 'details' => 'Invalid parameter "/1/headers": nonempty key and value pair expected.' ] ], [ @@ -537,7 +535,7 @@ class testMassUpdateItems extends CWebTest{ 'Request body type' => ['id' => 'post_type', 'value' => 'JSON data'], 'Request body' => ['id' => 'posts', 'value' => '"request": "active checks", "host": "host"'] ], - 'details' => 'Invalid parameter "posts": JSON is expected.' + 'details' => 'Invalid parameter "/1/posts": JSON is expected.' ] ], [ @@ -554,7 +552,7 @@ class testMassUpdateItems extends CWebTest{ 'Request body type' => ['id' => 'post_type', 'value' => 'XML data'], 'Request body' => ['id' => 'posts', 'value' => 'xml version="1.0" encoding="UTF-8"?<zabbix_export></zabbix_export>'] ], - 'details' => 'Invalid parameter "posts": (4) Start tag expected, \'<\' not found [Line: 1 | Column: 1].' + 'details' => 'Invalid parameter "/1/posts": (4) Start tag expected, \'<\' not found [Line: 1 | Column: 1].' ] ], [ @@ -571,7 +569,7 @@ class testMassUpdateItems extends CWebTest{ 'Request body type' => ['id' => 'post_type', 'value' => 'XML data'], 'Request body' => ['id' => 'posts', 'value' => ''] ], - 'details' => 'Invalid parameter "posts": XML is expected.' + 'details' => 'Invalid parameter "/1/posts": cannot be empty.' ] ], [ @@ -586,7 +584,7 @@ class testMassUpdateItems extends CWebTest{ 'Host interface' => ['id' => 'interface-select', 'value' => '127.0.5.1:10051'], 'URL' => ['id' => 'url', 'value' => ''] ], - 'details' => 'Invalid parameter "/url": cannot be empty.' + 'details' => 'Invalid parameter "/1/url": cannot be empty.' ] ], [ @@ -601,7 +599,7 @@ class testMassUpdateItems extends CWebTest{ 'Host interface' => ['id' => 'interface-select', 'value' => '127.0.5.4:10054'], 'JMX endpoint' => ['id' => 'jmx_endpoint', 'value' => ''] ], - 'details' => 'Incorrect value for field "jmx_endpoint": cannot be empty.' + 'details' => 'Invalid parameter "/1/jmx_endpoint": cannot be empty.' ] ], [ @@ -621,7 +619,7 @@ class testMassUpdateItems extends CWebTest{ 'User name' => ['id' => 'username', 'value' => 'new_test_name'], 'Password' => ['id' => 'password', 'value' => ''] ], - 'details' => 'Incorrect value for field "username": both username and password should be either present or empty.' + 'details' => 'Invalid parameter "/1": both username and password should be either present or empty.' ] ], [ @@ -641,7 +639,7 @@ class testMassUpdateItems extends CWebTest{ 'User name' => ['id' => 'username', 'value' => ''], 'Password' => ['id' => 'password', 'value' => 'new_test_password'] ], - 'details' => 'Incorrect value for field "username": both username and password should be either present or empty.' + 'details' => 'Invalid parameter "/1": both username and password should be either present or empty.' ] ], [ @@ -655,7 +653,7 @@ class testMassUpdateItems extends CWebTest{ 'Type' => ['id' => 'type', 'value' => 'SNMP agent'], 'Host interface' => ['id' => 'interface-select', 'value' => '127.0.5.5:10055'] ], - 'details' => 'No SNMP OID specified.', + 'details' => 'Invalid parameter "/1/snmp_oid": cannot be empty.', 'interface_text_part' => 'SNMPv3, Context name: zabbix' ] ], @@ -663,19 +661,6 @@ class testMassUpdateItems extends CWebTest{ [ 'expected' => TEST_BAD, 'names' => [ - '1_Item', - '2_Item' - ], - 'change' => [ - 'Type' => ['id' => 'type', 'value' => 'Dependent item'] - ], - 'details' => 'Incorrect value for field "master_itemid": cannot be empty.' - ] - ], - [ - [ - 'expected' => TEST_BAD, - 'names' => [ '17_Script', '18_Script' ], @@ -1126,31 +1111,32 @@ class testMassUpdateItems extends CWebTest{ ] ] ], - [ - [ - 'names' => [ - '1_Item', - '2_Item' - ], - 'change' => [ - 'Type' => ['id' => 'type', 'value' => 'TELNET agent'], - 'User name' => ['id' => 'username', 'value' => 'telnet_name'], - 'Password' => ['id' => 'password', 'value' => 'telnet_password'] - ] - ] - ], - [ - [ - 'names' => [ - '1_Item', - '2_Item' - ], - 'change' => [ - 'Type' => ['id' => 'type', 'value' => 'Calculated'], - 'Type of information' => ['id' => 'value_type', 'value' => 'Numeric (float)'] - ] - ] - ], + // TODO: uncomment or delete after discussion +// [ +// [ +// 'names' => [ +// '1_Item', +// '2_Item' +// ], +// 'change' => [ +// 'Type' => ['id' => 'type', 'value' => 'TELNET agent'], +// 'User name' => ['id' => 'username', 'value' => 'telnet_name'], +// 'Password' => ['id' => 'password', 'value' => 'telnet_password'] +// ] +// ] +// ], +// [ +// [ +// 'names' => [ +// '1_Item', +// '2_Item' +// ], +// 'change' => [ +// 'Type' => ['id' => 'type', 'value' => 'Calculated'], +// 'Type of information' => ['id' => 'value_type', 'value' => 'Numeric (float)'] +// ] +// ] +// ], [ [ 'names' => [ @@ -1510,7 +1496,7 @@ class testMassUpdateItems extends CWebTest{ 'Preprocessing steps' => [ ['type' => 'Custom multiplier', 'parameter_1' => 'abc'] ], - 'details' => 'Incorrect value for field "params": a numeric value is expected.' + 'details' => 'Invalid parameter "/1/preprocessing/1/params/1": a floating point value is expected.' ] ], [ @@ -1524,7 +1510,8 @@ class testMassUpdateItems extends CWebTest{ ['type' => 'Simple change'], ['type' => 'Simple change'] ], - 'details' => 'Only one change step is allowed.' + 'details' => 'Invalid parameter "/1/preprocessing/2": only one object can exist within the '. + 'combinations of (type)=((9, 10)).' ] ], [ @@ -1537,7 +1524,8 @@ class testMassUpdateItems extends CWebTest{ 'Preprocessing steps' => [ ['type' => 'In range', 'parameter_1' => '8', 'parameter_2' => '-8'] ], - 'details' => 'Incorrect value for field "params": "min" value must be less than or equal to "max" value.' + 'details' => 'Invalid parameter "/1/preprocessing/1/params/2": cannot be less than or equal to '. + 'the value of parameter "/1/preprocessing/1/params/1".' ] ], [ @@ -1550,7 +1538,7 @@ class testMassUpdateItems extends CWebTest{ 'Preprocessing steps' => [ ['type' => 'Check for error using regular expression', 'parameter_1' => 'test'] ], - 'details' => 'Incorrect value for field "params": second parameter is expected.' + 'details' => 'Invalid parameter "/1/preprocessing/1/params/2": cannot be empty.' ] ], [ @@ -1564,7 +1552,8 @@ class testMassUpdateItems extends CWebTest{ ['type' => 'Discard unchanged'], ['type' => 'Discard unchanged with heartbeat', 'parameter_1' => '1'] ], - 'details' => 'Only one throttling step is allowed.' + 'details' => 'Invalid parameter "/1/preprocessing/2": only one object can exist within the '. + 'combinations of (type)=((19, 20)).' ] ], [ @@ -1577,7 +1566,7 @@ class testMassUpdateItems extends CWebTest{ 'Preprocessing steps' => [ ['type' => 'Regular expression'] ], - 'details' => 'Incorrect value for field "params": first parameter is expected.' + 'details' => 'Invalid parameter "/1/preprocessing/1/params/1": cannot be empty.' ] ], [ @@ -1595,7 +1584,7 @@ class testMassUpdateItems extends CWebTest{ 'error_handler' => 'Set error to' ] ], - 'details' => 'Incorrect value for field "error_handler_params": cannot be empty.' + 'details' => 'Invalid parameter "/1/preprocessing/1/error_handler_params": cannot be empty.' ] ], [ |