Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[WIPTEST] Fix AttributeError: 'ConfigManagementToolbar' object has no attribute 'reload' #10315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Commits on Sep 8, 2020

  1. Rename attribute refresh to reload

    to make it work with code for adding the provider
    
    I am not sure how to 100% reproduce this, but the traceback was:
    ```
    2020-09-04 00:48:40,891 [E] [cfme] def validate(self, timeout=1000, delay=5):
            refresh_timer = RefreshTimer(time_for_refresh=300)
            try:
                wait_for(self.is_refreshed,
                         [refresh_timer],
                         message="is_refreshed",
                         timeout=timeout,
                         delay=delay,
    >                    handle_exception=True)
    E                    wait_for.TimedOutError: Could not do 'is_refreshed' at /home/jhenner/work/miq/bad_awx_template_bz/.cfme_venv3/lib64/python3.7/site-packages/varmeth/__init__.py:79 in time
    
    cfme/common/provider.py:743: TimedOutError
    
    During handling of the above exception, another exception occurred:
    
        @pytest.mark.provider([AnsibleTowerProvider], selector=ONE_PER_VERSION, scope="function")
        @pytest.mark.meta(automates=[1819310])
        def test_awx_with_special_chars_refreshes(appliance: IPAppliance, provider: AnsibleTowerProvider,
                                                  add_special_characters):
            """
            Tests whether provider with special characters in template definition refreshes in CFME
    
            :param appliance:
            :param provider:
            :param add_special_characters:
            :return:
    
            Polarion:
              assignee
              initialEstimate
            """
            # TODO Fill this
            add_special_characters(provider)
    >       provider.setup()
    
    cfme/tests/infrastructure/test_providers.py:578:
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    cfme/common/provider.py:715: in setup
        return self.create_rest(check_existing=True, validate_inventory=True)
    cfme/infrastructure/config_management/__init__.py:468: in create_rest
        self.validate(timeout=300)
    cfme/common/provider.py:746: in validate
        self.load_details(refresh=True)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
        def load_details(self, refresh=False):
            """To be compatible with the Taggable and PolicyProfileAssignable mixins.
    
            Returns: ProviderDetails view
            """
            view = navigate_to(self, 'Details')
            if refresh:
    >           view.toolbar.reload.click()
    E           AttributeError: 'ConfigManagementToolbar' object has no attribute 'reload'
    ```
    Jaroslav Henner committed Sep 8, 2020
    Configuration menu
    Copy the full SHA
    d5f7832 View commit details
    Browse the repository at this point in the history