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_unprivileged_user_odf_access fails on login #10779

Open
DanielOsypenko opened this issue Oct 29, 2024 · 1 comment
Open

test_unprivileged_user_odf_access fails on login #10779

DanielOsypenko opened this issue Oct 29, 2024 · 1 comment
Assignees
Labels
Squad/Black Covers UI specific test cases such as ODF Dashboard etc. TestCase failing

Comments

@DanielOsypenko
Copy link
Contributor

Test can't login with newly created user.
I was repeating the steps manually, but added a step to recreate oath pods with oc delete pods -n openshift-authentication --all and managed to login wit the same user/pwd

http://magna002.ceph.redhat.com/ocsci-jenkins/openshift-clusters/j-073vup1cs33-t1/j-073vup1cs33-t1_20240901T153421/logs/ui_logs_dir_1725223351/screenshots_ui/test_unprivileged_user_odf_access/2024-09-02T03-36-31.306361.png

error stack:

self = <tests.functional.ui.test_non_admin_user.TestUnprivilegedUserODFAccess object at 0x7faf2825fa60>
user_factory = <function user_factory.._factory at 0x7faf4e4928b0>
login_factory = <function login_factory_fixture..factory at 0x7faf4e4920d0>


@ui
@tier1
@runs_on_provider
@skipif_ibm_cloud_managed
@bugzilla("2103975")
@polarion_id("OCS-4667")
def test_unprivileged_user_odf_access(self, user_factory, login_factory):
    # create a user without any role
    user = user_factory()
    logger.info(f"user created: {user[0]} password: {user[1]}")

    # login with the user created
    login_factory(user[0], user[1])

  validation_ui_obj = ValidationUI()

tests/functional/ui/test_non_admin_user.py:88: 



ocs_ci/ocs/ui/validation_ui.py:32: in init
    super().init()
ocs_ci/ocs/ui/page_objects/page_navigator.py:54: in init
    self.page_has_loaded(30, 2, self.page_nav["page_navigator_sidebar"])
ocs_ci/ocs/ui/base_ui.py:521: in page_has_loaded
    page_hash = get_page_hash()
ocs_ci/utility/retry.py:31: in f_retry
    return f(args, *kwargs)
ocs_ci/ocs/ui/base_ui.py:508: in get_page_hash
    dom = self.get_element_attribute(module_loc, "innerHTML")



self = ValidationUI Web Page, locator = ('page-sidebar', 'id')
attribute = 'innerHTML', safe = False


def get_element_attribute(self, locator, attribute, safe: bool = False):
    """
    Get attribute from WebElement

    Args:
        locator (tuple): (GUI element needs to operate on (str), type (By)).
        attribute (str): the value of this attribute will be extracted from WebElement
        safe(bool): if True exception will not raise when element not found. Default option - not safe

    Returns:
        str: value of the attribute of requested and found WebElement
    """
    web_elements = self.get_elements(locator)
    if safe:
        if not len(web_elements):
            return

  return web_elements[0].get_attribute(attribute)
E       IndexError: list index out of rangea
@DanielOsypenko DanielOsypenko added TestCase failing Squad/Black Covers UI specific test cases such as ODF Dashboard etc. labels Oct 29, 2024
@DanielOsypenko
Copy link
Contributor Author

same issue applied to test_project_admin_obcs_access

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. TestCase failing
Projects
None yet
Development

No branches or pull requests

2 participants