Skip to content

Commit

Permalink
Add support for the new ui button (#1536) (#1537)
Browse files Browse the repository at this point in the history
(cherry picked from commit 714a54e)

Co-authored-by: Samuel Bible <sbible@redhat.com>
  • Loading branch information
Satellite-QE and sambible authored Sep 2, 2024
1 parent fe46eab commit 297fda9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions airgun/entities/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ def search(self, value):
view = self.navigate_to(self, 'All')
return view.search(value)

def new_ui_button(self):
"""Click New UI button and return the browser URL"""
view = self.navigate_to(self, 'All')
view.new_ui_button.click()
view.wait_displayed()
return self.browser.url

def reset_search(self):
"""This function loads a HostsView and clears the searchbox."""
view = HostsView(self.browser)
Expand Down
1 change: 1 addition & 0 deletions airgun/views/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ class HostsView(BaseLoggedInView, SearchableViewMixinPF4):
export = Text(".//a[contains(@class, 'btn')][contains(@href, 'hosts.csv')]")
new = Text(".//div[@id='rails-app-content']//a[contains(normalize-space(.),'Create Host')]")
register = PF4Button('OUIA-Generated-Button-secondary-2')
new_ui_button = Text(".//a[contains(@class, 'btn')][contains(@href, 'new/hosts')]")
select_all = Checkbox(locator="//input[@id='check_all']")
table = SatTable(
'.//table',
Expand Down

0 comments on commit 297fda9

Please sign in to comment.