From c840a154ace82d8010d443c49ac747a079600329 Mon Sep 17 00:00:00 2001 From: Samuel Bible Date: Tue, 29 Aug 2023 08:20:03 -0500 Subject: [PATCH] Rework of virt card (#933) * Handle no title case for search * Change to use hasattr * Rework locator for Virt card to be dynmically generated * Rework to simply use the existing hostdetailscard widget * Add sleep to allow virtualization card time to load * Change sleep to reading page twice to give time for virtcard to load * Give more time for virtcard to load * Utilize wait_displayed better --- airgun/entities/host_new.py | 2 +- airgun/views/host_new.py | 24 +----------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/airgun/entities/host_new.py b/airgun/entities/host_new.py index 2fbbbbfc3..0b8732d7e 100644 --- a/airgun/entities/host_new.py +++ b/airgun/entities/host_new.py @@ -478,7 +478,7 @@ def get_parameters(self, entity_name): def get_virtualization(self, entity_name): view = self.navigate_to(self, 'NewDetails', entity_name=entity_name) - view.wait_displayed() + view.details.virtualization.wait_displayed() self.browser.plugin.ensure_page_safe() return view.details.virtualization.read() diff --git a/airgun/views/host_new.py b/airgun/views/host_new.py index db57bbb01..40f64bb61 100644 --- a/airgun/views/host_new.py +++ b/airgun/views/host_new.py @@ -338,29 +338,7 @@ class networking_interface(Card): class virtualization(Card): ROOT = './/article[contains(@data-ouia-component-id, "card-template-Virtualization")]' - datacenter = Text('.//div[contains(@class, "pf-c-description-list__group")][1]//dd') - cluster = Text('.//div[contains(@class, "pf-c-description-list__group")][2]//dd') - memory = Text('.//div[contains(@class, "pf-c-description-list__group")][3]//dd') - public_ip_address = Text( - './/div[contains(@class, "pf-c-description-list__group")][4]//dd' - ) - mac_address = Text('.//div[contains(@class, "pf-c-description-list__group")][5]//dd') - cpus = Text('.//div[contains(@class, "pf-c-description-list__group")][6]//dd') - cores_per_socket = Text( - './/div[contains(@class, "pf-c-description-list__group")][7]//dd' - ) - firmware = Text('.//div[contains(@class, "pf-c-description-list__group")][8]//dd') - hypervisor = Text('.//div[contains(@class, "pf-c-description-list__group")][9]//dd') - connection_state = Text( - './/div[contains(@class, "pf-c-description-list__group")][10]//dd' - ) - overall_status = Text( - './/div[contains(@class, "pf-c-description-list__group")][11]//dd' - ) - annotation_notes = Text( - './/div[contains(@class, "pf-c-description-list__group")][12]//dd' - ) - running_on = Text('.//div[contains(@class, "pf-c-description-list__group")][13]//dd') + details = HostDetailsCard() @View.nested class content(Tab):