Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_blocking_pool_creation_rules. 2 consequent dots at rule checks of Edit label are failing test. #11006

Open
DanielOsypenko opened this issue Dec 8, 2024 · 0 comments
Assignees
Labels
Squad/Black Covers UI specific test cases such as ODF Dashboard etc.

Comments

@DanielOsypenko
Copy link
Contributor

http://magna002.ceph.redhat.com/ocsci-jenkins/openshift-clusters/j-024vup1cs33-t3/j-024vup1cs33-t3_20241029T130924/logs/ui_logs_dir_1730225949/screenshots_ui/test_blocking_pool_creation_rules/2024-10-29T19-12-29.590807.png

self = <tests.functional.ui.test_error_improvements.TestErrorMessageImprovements object at 0x7f9af6a62e80>
cephblockpool_factory_ui_class = <function cephblockpool_factory_ui_fixture..factory at 0x7f9aedad1280>


@bugzilla("2215910")
@bugzilla("2193109")
@polarion_id("OCS-4873")
@skipif_hci_provider_or_client
def test_blocking_pool_creation_rules(self, cephblockpool_factory_ui_class):
    """
    Test to verify
    * edit Block Pool label warnings
    * error rules for the name when creating a new blocking pool
        No more than 253 characters
        Starts and ends with a lowercase letter or number
        Only lowercase letters, numbers, non-consecutive periods, or hyphens
        Cannot be used before
    """

    block_pool_obj = cephblockpool_factory_ui_class()

    blocking_pool_tab = (
        PageNavigator()
        .nav_odf_default_page()
        .nav_storage_systems_tab()
        .nav_storagecluster_storagesystem_details()
        .nav_ceph_blockpool()
    )

    blocking_pool_tab.check_edit_labels(block_pool_obj.name)

    blocking_pool_tab.proceed_resource_creation()

  blocking_pool_tab.check_error_messages()

tests/functional/ui/test_error_improvements.py:143: 



ocs_ci/ocs/ui/page_objects/data_foundation_tabs_common.py:60: in check_error_messages
    self._verify_input_requirements()



self = BlockPools Web Page


def _verify_input_requirements(self):
    """
    Verify that all input requirements are met.
    Function retries to get all error message rule texts during 120 seconds.
    """
    # verify that all rules exist when input rules popup is visible
    for sample in TimeoutSampler(
        120,
        3,
        self._check_all_rules_exist,
        self.generic_locators["text_input_popup_rules"],
    ):
        if sample:
            self.test_results.loc[len(self.test_results)] = [
                None,
                self._check_all_rules_exist.__name__,
                True,
            ]
            break
        else:
            self.do_click(self.validation_loc["input_value_validator_icon"])
            logger.info("retrying get all error message rule texts")

    # invoke execution of every rule-checker function
    for rule, func in self.rules.items():
        res = func(rule)
        self.test_results.loc[len(self.test_results)] = [rule, func.__name__, res]

    logger.info(
        "\n"
        + self.test_results.to_markdown(
            headers="keys", index=False, tablefmt="grid"
        )
    )

    if not self.test_results[self.result_col[2]].all():
        failed_cases = self.test_results[~self.test_results[self.result_col[2]]]

      pytest.fail(
            "Error message improvements check failed\n"
            f"{failed_cases.to_markdown(headers='keys', index=False, tablefmt='grid')}"
        )
E           Failed: Error message improvements check failed
E           +--------------------------------+-------------------+----------------+
E           | rule                           | check_func        | check_status   |
E           +================================+===================+================+
E           | edit Block Pool label warnings | check_edit_labels | False          |
E           +--------------------------------+-------------------+----------------+

consulted with Bipul Adhikari, but no solution was available at the time of opening this issue.

@DanielOsypenko DanielOsypenko added the Squad/Black Covers UI specific test cases such as ODF Dashboard etc. label Dec 8, 2024
@DanielOsypenko DanielOsypenko self-assigned this Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Squad/Black Covers UI specific test cases such as ODF Dashboard etc.
Projects
None yet
Development

No branches or pull requests

1 participant