diff --git a/Makefile b/Makefile index f29ced38c..5f855577e 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ COCKPIT_REPO_FILES = \ $(NULL) COCKPIT_REPO_URL = https://github.com/cockpit-project/cockpit.git -COCKPIT_REPO_COMMIT = 6d478ad51585d9d7f8c4567c155bd641635f284f # 327 + 33 commits +COCKPIT_REPO_COMMIT = 3b1a41701581de0ed6826191b6d72e835a7f5706 # 327 + 64 commits $(COCKPIT_REPO_FILES): $(COCKPIT_REPO_STAMP) COCKPIT_REPO_TREE = '$(strip $(COCKPIT_REPO_COMMIT))^{tree}' diff --git a/test/check-machines-create b/test/check-machines-create index cea67ce90..ce76040fb 100755 --- a/test/check-machines-create +++ b/test/check-machines-create @@ -1377,10 +1377,10 @@ vnc_password= "{vnc_passwd}" else: b.wait_not_present("#source-type") - if self.sourceType == 'file' or self.sourceType == 'cloud': - b.set_file_autocomplete_val("#source-file-group", self.location or " ") - elif self.sourceType == 'disk_image': - b.set_file_autocomplete_val("#source-disk-group", self.location or " ") + if (self.sourceType == 'file' or self.sourceType == 'cloud') and self.location: + b.set_file_autocomplete_val("#source-file-group", self.location) + elif self.sourceType == 'disk_image' and self.location: + b.set_file_autocomplete_val("#source-disk-group", self.location) elif self.sourceType == 'pxe': if self.location: b.select_from_dropdown("#network-select", self.location) diff --git a/test/check-machines-disks b/test/check-machines-disks index 3e0fb5e9a..1ed5286f9 100755 --- a/test/check-machines-disks +++ b/test/check-machines-disks @@ -1260,10 +1260,10 @@ class TestMachinesDisks(machineslib.VirtualMachinesCase): self, mode='custom-path' ).openDialog() - b.click(f"{prefix}-file .pf-v5-c-select__toggle-button") - b.wait_visible(f"{prefix}-file-autocomplete") + b.click(f"{prefix}-file-autocomplete .pf-v5-c-menu-toggle__button") + b.wait_visible(".pf-v5-c-menu__content") b.key("ArrowDown") - b.focus(f"{prefix}-file-autocomplete li:first-child") + b.focus(".pf-v5-c-menu__content li:first-child") for _retry in range(0, 10): b.key("ArrowDown") time.sleep(0.5) diff --git a/test/check-machines-filesystems b/test/check-machines-filesystems index d644da5b5..44e75e6f6 100755 --- a/test/check-machines-filesystems +++ b/test/check-machines-filesystems @@ -55,23 +55,14 @@ class TestMachinesFilesystems(machineslib.VirtualMachinesCase): b.set_input_text("#vm-subVmTest1-filesystems-modal-mountTag", "test") b.click("#vm-subVmTest1-filesystems-modal-add") - b.wait_visible("#vm-subVmTest1-filesystems-modal-source-helper") + b.wait_text("#vm-subVmTest1-filesystems-modal-source-helper", "Source must not be empty") b.wait_not_present("#vm-subVmTest1-filesystems-modal-mountTag-helper") b.set_input_text("#vm-subVmTest1-filesystems-modal-mountTag", "") - b.set_input_text("#vm-subVmTest1-filesystems-modal-source-group input", "/tmp") - # In some hosts with the high latency, the path of the expand list needs some time to load, - # the check will fail if it is too quick. - # Thus, add a check that the folder input appears in the expand list(#vm-{name}-filesystems-modal-source) - # to ensure that the loading is finished #vm-{name}-filesystems-modal-source only contains the expand list, - # without the input line. - b.wait_in_text("#vm-subVmTest1-filesystems-modal-source", "/tmp") - b.click("#vm-subVmTest1-filesystems-modal-source button:nth-child(1)") - # Check the expand list disappears - b.wait_not_present("#vm-subVmTest1-filesystems-modal-source") + b.set_file_autocomplete_val("#vm-subVmTest1-filesystems-modal-source-group", "/tmp/") b.click("#vm-subVmTest1-filesystems-modal-add") b.wait_not_present("#vm-subVmTest1-filesystems-modal-source-helper") - b.wait_visible("#vm-subVmTest1-filesystems-modal-mountTag-helper") + b.wait_text("#vm-subVmTest1-filesystems-modal-mountTag-helper", "Mount tag must not be empty") b.click("#vm-subVmTest1-filesystems-modal-cancel") @@ -128,8 +119,13 @@ class TestMachinesFilesystems(machineslib.VirtualMachinesCase): # Try to add a new shared filesystem with non existing source directory b.click("#vm-subVmTest1-filesystems-add") b.set_input_text("#vm-subVmTest1-filesystems-modal-source-group input", "dir3") - b.wait_in_text("#vm-subVmTest1-filesystems-modal-source", "No such file or directory") + b.wait_in_text("#vm-subVmTest1-filesystems-modal-source-group ul", "No such file or directory") + b.click("#vm-subVmTest1-filesystems-modal-source button[aria-label='Clear input value']") + b.click("#vm-subVmTest1-filesystems-modal-source button[aria-label='Typeahead menu toggle']") + b.blur("#vm-subVmTest1-filesystems-modal-source-group input") + b.wait_not_present("#vm-subVmTest1-filesystems-modal-source .pf-v5-c-menu") b.click("#vm-subVmTest1-filesystems-modal-cancel") + b.wait_not_present(".pf-v5-c-modal-box__body ") # Start VM and ensure that adding filesystem is disabled b.click("#vm-subVmTest1-system-run") diff --git a/test/check-machines-snapshots b/test/check-machines-snapshots index c04d5125e..10c3f3ac9 100755 --- a/test/check-machines-snapshots +++ b/test/check-machines-snapshots @@ -158,6 +158,8 @@ class TestMachinesSnapshots(machineslib.VirtualMachinesCase): b.set_input_text("#snapshot-create-dialog-description", self.description) if self.memory_path is not None: b.set_input_text("#snapshot-create-dialog-memory-location input", self.memory_path) + # Setting the input pops up the dropdown, clicking it away should show an validation error + b.click("#snapshot-create-dialog-memory-location button[aria-label='Typeahead menu toggle']") def assert_pixels(self): if self.name == 'test_snap_1': @@ -526,7 +528,7 @@ virsh snapshot-create-as --domain subVmTest1 --name snapshotA --description 'Des # Check creation of new directories b.set_input_text("#snapshot-create-dialog-memory-location input", snapshot_dir + "/new") - b.wait_text("#snapshot-create-dialog-memory-location li button", f'Create "{snapshot_dir}/new"') + b.wait_text("#snapshot-create-dialog-memory-location li button", f"Create {snapshot_dir}/new") b.click("#snapshot-create-dialog-memory-location li button") # Check available space detection @@ -560,7 +562,7 @@ virsh snapshot-create-as --domain subVmTest1 --name snapshotA --description 'Des snapshot_dir2 = "/var/lib/libvirt2" if connection == "system" else "/home/admin/.local/share/libvirt/2" b.set_input_text("#snapshot-create-dialog-memory-location input", snapshot_dir2) - b.wait_text("#snapshot-create-dialog-memory-location li button", f'Create "{snapshot_dir2}"') + b.wait_text("#snapshot-create-dialog-memory-location li button", f"Create {snapshot_dir2}") b.click("#snapshot-create-dialog-memory-location li:first-child button") # Wait a couple of seconds to guarantee a different diff --git a/test/reference b/test/reference index d610bd77d..b4aec73f6 160000 --- a/test/reference +++ b/test/reference @@ -1 +1 @@ -Subproject commit d610bd77d2a9b589812e924494df7b6d0f7dcf9d +Subproject commit b4aec73f6b1df6f9f7449f6308be53c4aff21ac4