GUI acceptance tests using environment deployed from packages.

Build: #2625 failed

Job: Onezone spaces memberships privileges failed

Stages & jobs

  1. Qnthack - copy quarantine

  2. Acceptance Test

  3. Qnthack - rerun

nonspaceowner successfully views data if he got read files privilege[1oz 1op deployed]: Test case result

The below summarizes the result of the test " nonspaceowner successfully views data if he got read files privilege[1oz 1op deployed]" in build 2,625 of Onedata Products - gui acceptance pkg - Onezone spaces memberships privileges.
Description
nonspaceowner successfully views data if he got read files privilege[1oz 1op deployed]
Test class
gui.scenarios.test_onezone_spaces_memberships_privileges
Method
test_nonspaceowner_successfully_views_data_if_he_got_read_files_privilege[1oz_1op_deployed]
Duration
1 min
Status
Failed (Existing Failure)

Error Log

RuntimeError: Css element wtih "Save" text not found
selenium = {'browser_user1': <selenium.webdriver.chrome.webdriver.WebDriver (session="7ab333cb6a83146c19c518585106f357")>, 'space_owner_browser': <selenium.webdriver.chrome.webdriver.WebDriver (session="ad0a3bbec8b30775a17163695f2107f0")>}
browser_id = 'space_owner_browser', member_name = 'user1', member_type = 'user'
where = 'space'
config = 'Data management:\n  granted: Partially\n  privilege subtypes:\n    Read files: False'
onepanel = <class 'tests.gui.utils.onepanel.Onepanel'>
oz_page = <class 'tests.gui.utils.onezone.OZLoggedIn'>

    @wt(parsers.re('user of (?P<browser_id>.*) sets following privileges for '
                   '"(?P<member_name>.*)" (?P<member_type>user|group) '
                   'in (?P<where>space|group|harvester|cluster|automation) '
                   'members subpage:'
                   r'\n(?P<config>(.|\s)*)'))
    def set_privileges_in_members_subpage(selenium, browser_id, member_name,
                                          member_type, where, config, onepanel,
                                          oz_page):
        try:
>           assert_privileges_in_members_subpage(selenium, browser_id, member_name,
                                                 member_type, where, config,
                                                 onepanel, oz_page)

tests/gui/steps/onezone/members.py:527: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ({'browser_user1': <selenium.webdriver.chrome.webdriver.WebDriver (session="7ab333cb6a83146c19c518585106f357")>, 'spac... 'user1', 'user', 'space', 'Data management:\n  granted: Partially\n  privilege subtypes:\n    Read files: False', ...)
kwargs = {}
ba = <BoundArguments (selenium={'browser_user1': <selenium.webdriver.chrome.webdriver.WebDriver (session="7ab333cb6a83146c1...s: False', onepanel=<class 'tests.gui.utils.onepanel.Onepanel'>, oz_page=<class 'tests.gui.utils.onezone.OZLoggedIn'>)>
param = <Parameter "oz_page">, ann = <class 'inspect._empty'>

    @wraps(fun)
    def wrapper(*args, **kwargs):
        ba = sig.bind(*args, **kwargs)
        ba.apply_defaults()
    
        for param in parameters.values():
            ann = param.annotation
            if ann is not inspect.Parameter.empty:
                value = ba.arguments[param.name]
                try:
                    if not isinstance(value, ann):
                        ba.arguments[param.name] = ann(value)
                except Exception as ex:
                    msg = f"Cannot cast '{param.name}' <{value}> to {ann}"
                    raise ValueError(msg) from ex
    
>       return fun(*ba.args, **ba.kwargs)

tests/utils/bdd_utils.py:78: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

selenium = {'browser_user1': <selenium.webdriver.chrome.webdriver.WebDriver (session="7ab333cb6a83146c19c518585106f357")>, 'space_owner_browser': <selenium.webdriver.chrome.webdriver.WebDriver (session="ad0a3bbec8b30775a17163695f2107f0")>}
browser_id = 'space_owner_browser', member_name = 'user1', member_type = 'users'
where = 'space'
config = 'Data management:\n  granted: Partially\n  privilege subtypes:\n    Read files: False'
onepanel = <class 'tests.gui.utils.onepanel.Onepanel'>
oz_page = <class 'tests.gui.utils.onezone.OZLoggedIn'>

    @wt(parsers.re('user of (?P<browser_id>.*) sees following privileges of '
                   '"(?P<member_name>.*)" (?P<member_type>user|group) '
                   'in (?P<where>space|group|harvester|automation|cluster) '
                   'members subpage:\n(?P<config>(.|\s)*)'))
    def assert_privileges_in_members_subpage(selenium, browser_id, member_name,
                                             member_type, where, config, onepanel,
                                             oz_page):
        member_type = member_type + 's'
    
        privileges = yaml.load(config)
        tree = get_privilege_tree(selenium, browser_id, onepanel, oz_page, where,
                                  member_type, member_name)
>       tree.assert_privileges(selenium, browser_id, privileges)

tests/gui/steps/onezone/members.py:601: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.gui.utils.common.privilege_tree.PrivilegeTree object at 0x7f29f3bf4d60>
selenium = {'browser_user1': <selenium.webdriver.chrome.webdriver.WebDriver (session="7ab333cb6a83146c19c518585106f357")>, 'space_owner_browser': <selenium.webdriver.chrome.webdriver.WebDriver (session="ad0a3bbec8b30775a17163695f2107f0")>}
browser_id = 'space_owner_browser'
privileges = {'Data management': {'granted': 'Partially', 'privilege subtypes': {'Read files': False}}}

    def assert_privileges(self, selenium, browser_id, privileges):
        """Assert privileges according to given config.
                For this method only dict should be passed!
    
                Config format given in earlier in yaml is as follow:
    
                    privilege_type:
                        granted: True/False/Partially
                        privilege subtypes:            ---> always and only when
                                                            granted is Partially
                            privilege_subtype: True/False
                    ...
    
                    Space management:
                      granted: Partially
                      privilege subtypes:
                        Modify space: True
                        Remove space: False
                    User management:
                      granted: False
                """
>       self._assert_privileges(selenium, browser_id, privileges)

tests/gui/utils/common/privilege_tree.py:123: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.gui.utils.common.privilege_tree.PrivilegeTree object at 0x7f29f3bf4d60>
selenium = {'browser_user1': <selenium.webdriver.chrome.webdriver.WebDriver (session="7ab333cb6a83146c19c518585106f357")>, 'space_owner_browser': <selenium.webdriver.chrome.webdriver.WebDriver (session="ad0a3bbec8b30775a17163695f2107f0")>}
browser_id = 'space_owner_browser'
privileges = {'Data management': {'granted': 'Partially', 'privilege subtypes': {'Read files': False}}}

    def _assert_privileges(self, selenium, browser_id, privileges):
        for privilege_name, privilege_group in privileges.items():
>           self._assert_privilege_group(selenium, browser_id, privilege_group,
                                         privilege_name)

tests/gui/utils/common/privilege_tree.py:127: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.gui.utils.common.privilege_tree.PrivilegeTree object at 0x7f29f3bf4d60>
selenium = {'browser_user1': <selenium.webdriver.chrome.webdriver.WebDriver (session="7ab333cb6a83146c19c518585106f357")>, 'space_owner_browser': <selenium.webdriver.chrome.webdriver.WebDriver (session="ad0a3bbec8b30775a17163695f2107f0")>}
browser_id = 'space_owner_browser'
group = {'granted': 'Partially', 'privilege subtypes': {'Read files': False}}
name = 'Data management'

    def _assert_privilege_group(self, selenium, browser_id, group, name):
        driver = selenium[browser_id]
        privilege_row = self.privilege_groups[name]
        granted = group['granted']
        if granted == 'Partially':
            sub_privileges = group['privilege subtypes']
            privilege_row.expand()
            for sub_name, sub_granted in sub_privileges.items():
                sub_row = privilege_row.get_sub_privilege_row(sub_name)
>               sub_row.assert_privilege_granted(sub_granted)

tests/gui/utils/common/privilege_tree.py:139: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.gui.utils.common.privilege_tree.PrivilegeRow object at 0x7f29f3c569d0>
granted = False

    def assert_privilege_granted(self, granted):
        if granted == "Partially":
            msg = f'{self.name} should be partially granted but is not'
            assert self.toggle.is_partial_checked(), msg
        elif granted:
            msg = f'{self.name} should be granted but is not'
            assert self.toggle.is_checked(), msg
        else:
            msg = f'{self.name} should not be granted but it is'
>           assert self.toggle.is_unchecked(), msg
E           AssertionError: Read files should not be granted but it is

tests/gui/utils/common/privilege_tree.py:36: AssertionError

During handling of the above exception, another exception occurred:

request = <FixtureRequest for <Function 'test_nonspaceowner_successfully_views_data_if_he_got_read_files_privilege[1oz_1op_deployed]'>>

    @pytest.mark.usefixtures(*function_args)
    def scenario_wrapper(request):
>       _execute_scenario(feature, scenario, request, encoding)

/usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:227: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:189: in _execute_scenario
    _execute_step_function(request, scenario, step, step_func)
/usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:130: in _execute_step_function
    step_func(**kwargs)
tests/utils/bdd_utils.py:78: in wrapper
    return fun(*ba.args, **ba.kwargs)
tests/gui/steps/onezone/members.py:537: in set_privileges_in_members_subpage
    click_button_on_element_header_in_members(selenium, browser_id, option,
tests/utils/bdd_utils.py:78: in wrapper
    return fun(*ba.args, **ba.kwargs)
<decorator-gen-863>:2: in click_button_on_element_header_in_members
    ???
tests/utils/utils.py:95: in wrapper
    return fun(*args, **kwargs)
tests/gui/steps/onezone/members.py:631: in click_button_on_element_header_in_members
    getattr(header, option).click()
tests/gui/utils/core/web_elements.py:58: in __get__
    elem = super(WebItem, self).__get__(instance, owner)
tests/gui/utils/core/web_elements.py:50: in __get__
    return find_web_elem_with_text(instance.web_elem,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

web_elem_root = <selenium.webdriver.remote.webelement.WebElement (session="ad0a3bbec8b30775a17163695f2107f0", element="75de4247-77b9-4340-bdb2-b8c01f8bac2a")>
css_sel = '.save-btn', text = 'Save'
err_msg = <function WebElementWithText.__get__.<locals>.<lambda> at 0x7f29f3bfff70>

    def find_web_elem_with_text(web_elem_root, css_sel, text, err_msg):
        items = web_elem_root.find_elements_by_css_selector(css_sel)
        _scroll_to_css_sel(web_elem_root, css_sel)
        for item in items:
            if item.text.lower() == text.lower():
                return item
        else:
>           raise RuntimeError(f'Css element wtih "{text}" text not found')
E           RuntimeError: Css element wtih "Save" text not found

tests/gui/utils/generic.py:130: RuntimeError