Skip to content

chore(deps): update all dependencies #841

chore(deps): update all dependencies

chore(deps): update all dependencies #841

GitHub Actions / test-report-9.1.1__chrome_test_splunk_ta_example_addon_proxy failed Oct 15, 2023 in 0s

test-report-9.1.1__chrome_test_splunk_ta_example_addon_proxy ❌

Tests failed

❌ test-results/test.xml

15 tests were completed in 755s with 14 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
pytest 14✅ 1❌ 755s

❌ pytest

tests.ui.test_splunk_ta_example_addon_proxy.chrome_TestProxy
  ✅ test_proxy_fields_label_entity
  ❌ test_proxy_fields_placeholder_value
	self = <ui.test_splunk_ta_example_addon_proxy.TestProxy object at 0x7f63aac379a0>
  ✅ test_proxy_default_configs
  ✅ test_proxy_required_field_host
  ✅ test_proxy_host_valid_input
  ✅ test_proxy_host_field_length_validation
  ✅ test_proxy_required_field_port
  ✅ test_proxy_port_field_valid_range
  ✅ test_proxy_port_field_out_of_range
  ✅ test_proxy_list_proxy_types
  ✅ test_proxy_required_field_proxy_type
  ✅ test_proxy_username_field_length_validation
  ✅ test_proxy_encrypted_field_password
  ✅ test_proxy_frontend_validation
  ✅ test_proxy_backend_validation

Annotations

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-9.1.1__chrome_test_splunk_ta_example_addon_proxy

pytest ► tests.ui.test_splunk_ta_example_addon_proxy.chrome_TestProxy ► test_proxy_fields_placeholder_value

Failed test found in:
  test-results/test.xml
Error:
  self = <ui.test_splunk_ta_example_addon_proxy.TestProxy object at 0x7f63aac379a0>
Raw output
self = <ui.test_splunk_ta_example_addon_proxy.TestProxy object at 0x7f63aac379a0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f63aac18970>
ucc_smartx_rest_helper = <pytest_splunk_addon_ui_smartx.base_test.RestHelper object at 0x7f63aac19540>

    @pytest.mark.execute_enterprise_cloud_false
    @pytest.mark.forwarder
    @pytest.mark.proxy
    def test_proxy_fields_placeholder_value(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies proxy input field placeholder value"""
        proxy = Proxy(
            TA_NAME,
            TA_PROXY_URL,
            TA_CONF,
            ucc_smartx_selenium_helper,
            ucc_smartx_rest_helper,
        )
>       self.assert_util(proxy.host.get_placeholder_value, "optional")

tests/ui/test_splunk_ta_example_addon_proxy.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ui.test_splunk_ta_example_addon_proxy.TestProxy object at 0x7f63aac379a0>
left = <bound method TextBox.get_placeholder_value of <pytest_splunk_addon_ui_smartx.components.controls.textbox.TextBox object at 0x7f63a9798400>>
right = 'optional', operator = '==', left_args = {}, right_args = {}
msg = 'Condition Failed. \nLeft-value: \nOperator: ==\nRight-value: optional'

    def assert_util(
        self, left, right, operator="==", left_args={}, right_args={}, msg=None
    ):
        """
        Try to check the condition for {WAIT_TIMEOUT} seconds.
        In UI Automation, it is not possible to expect things to work properly just milliseconds after an action.
        Even in manual testing, we try things after 4-5 seconds and 2-3 times.
        This utility method tries to achive the same assertion.
        To perform certain action multiple time, provide callable functoins with arguments.
    
        Params:
            left (object or callable): LHS of the operator.
            right (object or callable): RHS of the operator
            operator: Operator. Possible values: (==, !=, <, >, <=, >=, in, not in, is, is not)
            left_args: If left is callable, pass the parameters of the callable function.
            right_args: If right is callable, pass the parameters of the callable function.
            msg: Error message if the condition was not matched even after trying for {WAIT_TIMEOUT} seconds.
    
        """
        args = {
            "left": left,
            "right": right,
            "operator": operator,
            "left_args": left_args,
            "right_args": right_args,
            "left_value": left,
            "right_value": right,
        }
        operator_map = {
            "==": lambda left, right: left == right,
            "!=": lambda left, right: left != right,
            "<": lambda left, right: left < right,
            "<=": lambda left, right: left <= right,
            ">": lambda left, right: left > right,
            ">=": lambda left, right: left >= right,
            "in": lambda left, right: left in right,
            "not in": lambda left, right: left not in right,
            "is": lambda left, right: left is right,
            "is not": lambda left, right: left is not right,
        }
    
        def _assert(browser):
            try:
                if callable(args["left"]):
                    args["left_value"] = args["left"](**args["left_args"])
                if callable(args["right"]):
                    args["right_value"] = args["right"](**args["right_args"])
            except TimeoutException as e:
                raise Exception("Timeout: {}".format(str(e)))
            except ElementNotInteractableException as e:
                raise Exception("Element not interactable: {}".format(str(e)))
            return operator_map[args["operator"]](
                args["left_value"], args["right_value"]
            )
    
        try:
            self.wait.until(_assert)
            condition_failed = False
        except (TimeoutException, ElementNotInteractableException) as e:
            logger.error("Exception raised: {}".format(str(e)))
            condition_failed = True
        if condition_failed:
            if not msg:
                msg = "Condition Failed. \nLeft-value: {}\nOperator: {}\nRight-value: {}".format(
                    args["left_value"], args["operator"], args["right_value"]
                )
>           assert operator_map[args["operator"]](
                args["left_value"], args["right_value"]
            ), msg
E           AssertionError: Condition Failed. 
E             Left-value: 
E             Operator: ==
E             Right-value: optional
E           assert False
E            +  where False = <function UccTester.assert_util.<locals>.<lambda> at 0x7f63a97e0040>('', 'optional')

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:573: AssertionError