Skip to content

Commit

Permalink
test: Close dialogs before next page interactions
Browse files Browse the repository at this point in the history
Selecting a new action from the main page while a dialog is open only
worked with our `ph_mouse()` cheat, not with proper clicks.
  • Loading branch information
martinpitt committed Aug 22, 2024
1 parent 0cd2a4d commit 32f7204
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/check-machines-disks
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ class TestMachinesDisks(machineslib.VirtualMachinesCase):
openDialog("sda")
b.wait_visible("#vm-subVmTest1-disks-sda-edit-bus-type:disabled")
b.wait_visible("#vm-subVmTest1-disks-sda-edit-cache-mode:disabled")
b.click("#vm-subVmTest1-disks-sda-edit-dialog button[aria-label='Close']")
b.wait_not_present("#vm-subVmTest1-disks-sda-edit-dialog")

# Disks on non-persistent VM cannot be edited
m.execute("virsh undefine subVmTest1")
Expand Down
2 changes: 2 additions & 0 deletions test/check-machines-lifecycle
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ class TestMachinesLifecycle(machineslib.VirtualMachinesCase):
b.set_input_text("#rename-dialog-new-name", "new")
b.click("#rename-dialog-confirm")
b.wait_in_text(".pf-v5-c-modal-box__body .pf-v5-c-alert.pf-m-danger", "Can't rename domain to itself")
b.click(".pf-v5-c-modal-box button:contains('Cancel')")
b.wait_not_present(".pf-v5-c-modal-box")

self.goToVmPage("new")
self.performAction("new", "rename")
Expand Down
2 changes: 2 additions & 0 deletions test/check-machines-settings
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ class TestMachinesSettings(machineslib.VirtualMachinesCase):
# Verify that unit conversions work
b.select_from_dropdown("#vm-subVmTest1-memory-modal-memory-unit-select", "GiB")
b.wait_attr("#vm-subVmTest1-memory-modal-memory", "value", "0")
b.click("#vm-memory-modal button[aria-label='Close']")
b.wait_not_present("#vm-memory-modal")

# Run VM
b.click("#vm-subVmTest1-system-run")
Expand Down

0 comments on commit 32f7204

Please sign in to comment.