From 89f35ae7361b008b84f8d8c9328fba4283fcc4c4 Mon Sep 17 00:00:00 2001 From: Sam Bible Date: Mon, 3 Jun 2024 02:02:33 -0500 Subject: [PATCH] add support for versions dropdown --- airgun/entities/contentview_new.py | 6 ++++++ airgun/views/contentview_new.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/airgun/entities/contentview_new.py b/airgun/entities/contentview_new.py index 6007da6c0..8ff2fe038 100644 --- a/airgun/entities/contentview_new.py +++ b/airgun/entities/contentview_new.py @@ -129,6 +129,12 @@ def read_french_lang_cv(self): view.wait_displayed() return view.table.read() + def click_version_dropdown(self, entity_name, version, dropdown_option): + """Clicks a specific dropdown option for a CV Version""" + view = self.navigate_to(self, 'Version', entity_name=entity_name, version=version) + self.browser.plugin.ensure_page_safe(timeout='5s') + return view.version_dropdown.item_select(dropdown_option) + @navigator.register(NewContentViewEntity, 'All') class ShowAllContentViewsScreen(NavigateStep): diff --git a/airgun/views/contentview_new.py b/airgun/views/contentview_new.py index c6db5fbdb..64054b810 100644 --- a/airgun/views/contentview_new.py +++ b/airgun/views/contentview_new.py @@ -279,6 +279,9 @@ class ContentViewVersionDetailsView(BaseLoggedInView): promoteButton = PF4Button( locator='.//button[@data-ouia-component-id="cv-details-publish-button"]' ) + version_dropdown = Dropdown( + locator='.//div[@data-ouia-component-id="cv-version-header-actions-dropdown"]' + ) editDescription = PF4Button( locator='.//button[@data-ouia-component-id="edit-button-description"]' )