Skip to content

chore(deps): update all dependencies #842

chore(deps): update all dependencies

chore(deps): update all dependencies #842

GitHub Actions / test-report-9.1.1__chrome_test_splunk_ta_example_addon_custom failed Oct 17, 2023 in 1s

test-report-9.1.1__chrome_test_splunk_ta_example_addon_custom ❌

Tests failed

❌ test-results/test.xml

23 tests were completed in 1127s with 22 passed, 1 failed and 0 skipped.

Test suite Passed Failed Skipped Time
pytest 22✅ 1❌ 1127s

❌ pytest

tests.ui.test_splunk_ta_example_addon_custom.chrome_TestCustom
  ✅ test_custom_fields_label_entity
  ❌ test_custom_fields_placeholder_value
	self = <ui.test_splunk_ta_example_addon_custom.TestCustom object at 0x7faa21878f10>
  ✅ test_custom_frontend_validation
  ✅ test_custom_backend_validation
  ✅ test_custom_required_field_test_string
  ✅ test_custom_valid_length_test_string_greater
  ✅ test_custom_valid_length_test_string_less
  ✅ test_custom_required_field_test_number
  ✅ test_custom_valid_input_test_number
  ✅ test_custom_valid_range_test_number
  ✅ test_custom_valid_input_test_regex
  ✅ test_custom_valid_input_test_email
  ✅ test_custom_valid_input_test_ipv4
  ✅ test_custom_valid_input_test_date
  ✅ test_custom_valid_input_test_url
  ✅ test_custom_select_value_test_radio
  ✅ test_custom_list_test_multiselect
  ✅ test_custom_select_value_test_multiselect
  ✅ test_custom_select_multiple_values_test_multiselect
  ✅ test_custom_search_value_test_multiselect
  ✅ test_custom_clear_text_test_multiselect
  ✅ test_custom_deselect_test_multiselect
  ✅ test_custom_help_link

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_custom

pytest ► tests.ui.test_splunk_ta_example_addon_custom.chrome_TestCustom ► test_custom_fields_placeholder_value

Failed test found in:
  test-results/test.xml
Error:
  self = <ui.test_splunk_ta_example_addon_custom.TestCustom object at 0x7faa21878f10>
Raw output
self = <ui.test_splunk_ta_example_addon_custom.TestCustom object at 0x7faa21878f10>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7faa1f8d6440>
ucc_smartx_rest_helper = <pytest_splunk_addon_ui_smartx.base_test.RestHelper object at 0x7faa20f551e0>

    @pytest.mark.execute_enterprise_cloud_true
    @pytest.mark.forwarder
    @pytest.mark.custom
    def test_custom_fields_placeholder_value(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
    ):
        """Verifies custom fields placeholder value"""
        custom = Custom(ucc_smartx_selenium_helper, ucc_smartx_rest_helper)
>       self.assert_util(custom.test_string.get_placeholder_value, "Required")

tests/ui/test_splunk_ta_example_addon_custom.py:52: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <ui.test_splunk_ta_example_addon_custom.TestCustom object at 0x7faa21878f10>
left = <bound method TextBox.get_placeholder_value of <pytest_splunk_addon_ui_smartx.components.controls.textbox.TextBox object at 0x7faa1f8d6950>>
right = 'Required', operator = '==', left_args = {}, right_args = {}
msg = 'Condition Failed. \nLeft-value: \nOperator: ==\nRight-value: Required'

    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: Required
E           assert False
E            +  where False = <function UccTester.assert_util.<locals>.<lambda> at 0x7faa1fb08040>('', 'Required')

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