diff --git a/ui/webui/test/check-storage b/ui/webui/test/check-storage index b1f1c22468bd..f72dfc5fdc71 100755 --- a/ui/webui/test/check-storage +++ b/ui/webui/test/check-storage @@ -287,6 +287,7 @@ class TestStorageExtraDisks(anacondalib.VirtInstallMachineCase, StorageHelpers): s.check_single_disk_destination("vda") s.rescan_disks() + s.check_disk_visible("vda") s.check_disk_visible(dev) @@ -297,12 +298,15 @@ class TestStorageExtraDisks(anacondalib.VirtInstallMachineCase, StorageHelpers): s.rescan_disks() + s.check_disk_selected("vda", True) + s.check_disk_selected(dev, False) + + s.select_disk(dev) + # Check that disk selection is kept on Next and Back - for disk in disks: - s.select_disk(disk) i.next() i.back() - for disk in disks: + for disk in ["vda", dev]: s.check_disk_selected(disk) class TestUtils(): @@ -554,6 +558,7 @@ class TestStorageMountPoints(anacondalib.VirtInstallMachineCase, TestUtils): # Select first only vdb disk and verify that the partitioning request is correct i.open() i.next() + s.rescan_disks() self.select_mountpoint(b, i, s, [(dev1, False), (dev2, True)]) diff --git a/ui/webui/test/helpers/storage.py b/ui/webui/test/helpers/storage.py index d52d4b8f69b0..81175d57a1d8 100644 --- a/ui/webui/test/helpers/storage.py +++ b/ui/webui/test/helpers/storage.py @@ -81,8 +81,10 @@ def check_disk_selected(self, disk, selected=True): def get_disk_selected(self, disk): return ( - self.browser.is_present(f"#{id_prefix}-selector-form li.pf-v5-c-chip-group__list-item:contains({disk})") or (disk in self.browser.text(f"#{id_prefix}-target-disk")) - ); + self.browser.is_present(f"#{id_prefix}-selector-form li.pf-v5-c-chip-group__list-item:contains({disk})") or + (self.browser.is_present(f"#{id_prefix}-target-disk") and + disk in self.browser.text(f"#{id_prefix}-target-disk")) + ) @log_step() def wait_no_disks(self):