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

add support for versions dropdown #1411

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions airgun/entities/contentview_new.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from navmazing import NavigateToSibling
import pytest
sambible marked this conversation as resolved.
Show resolved Hide resolved
from widgetastic.exceptions import NoSuchElementException
from widgetastic_patternfly4.dropdown import DropdownItemDisabled

from airgun.entities.base import BaseEntity
from airgun.navigation import NavigateStep, navigator
Expand Down Expand Up @@ -135,6 +137,20 @@ def click_version_dropdown(self, entity_name, version, dropdown_option):
self.browser.plugin.ensure_page_safe(timeout='5s')
sambible marked this conversation as resolved.
Show resolved Hide resolved
return view.version_dropdown.item_select(dropdown_option)

def republish_metadata_error(self, entity_name, version):
"""Clicks a specific dropdown option for a CV Version, that will throw an error"""
view = self.navigate_to(self, 'Version', entity_name=entity_name, version=version)
self.browser.plugin.ensure_page_safe(timeout='5s')
with pytest.raises(DropdownItemDisabled) as error:
sambible marked this conversation as resolved.
Show resolved Hide resolved
view.version_dropdown.item_select('Republish repository metadata')
if (
'Item "Republish repository metadata" of dropdown ".//div[@data-ouia-component-id="cv-version-header-actions-dropdown"]" is disabled'
sambible marked this conversation as resolved.
Show resolved Hide resolved
in error.value.args[0]
):
return True
else:
return 'No error was found, metadata unexpectedly was able to be published.'


@navigator.register(NewContentViewEntity, 'All')
class ShowAllContentViewsScreen(NavigateStep):
Expand Down