Commit Graph

21 Commits

Author SHA1 Message Date
Cole Robinson 61a4c00835 tests: uitests: Add mock test for VNC autoresize
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-05-19 16:46:30 -04:00
Cole Robinson e5a51f6374 details: Change Close accelerator to ctrl+shift+w
Close accelerator changes ctrl+w -> ctrl+shift+w
Quit accelerator changes ctrl+q -> ctrl+shift+q

After aafb874c8, if the mouse pointer isn't inside the console
window, it has keyboard focus but ctrl+w will be sent to the vmwindow
and not the VM. ctrl+w is a common shortcut for deleting a word so
this is pretty disruptive if you are typing inside the VM

Use gnome-terminal-esque accelerators starting with ctrl+shift to
reduce the chance of collision.

https://bugzilla.redhat.com/show_bug.cgi?id=1880295

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-21 14:33:25 -04:00
Cole Robinson 092a62552c uitests: More work to drop sleeping and hacks
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-20 14:32:55 -04:00
Cole Robinson 8ce83dbc53 uitests: big mess of work
* Convert to pytest style functions
* Move lots of shared code to our App class
* Reduce dogtail sleep amounts to speed up the whole testsuite
* Improve robustness in a lot of areas

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-19 17:10:19 -04:00
Cole Robinson ebf76563b8 uitests: Big code reorganization
Break utils.py apart into a whole uitests/lib/ directory with

* lib/_dogtailinit.py: all the dogtail library init we need
* lib/_node.py: extending our dogtail node class with more functions
* lib/app.py: VMMDogtailApp
* lib/util.py: util functions plus all the special helpers previously
    in our custom TestCase
* lib/testcase.py: The TestCase that sets and tears down self.app

Adjust callers to match and make it easier to eventually convert to
native pytest usage

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-11 13:55:54 -04:00
Cole Robinson ac8591192f console: Add option to disable autoconnect
As part of making virt-manager cooperate better with external viewers,
add an option to disable console autoconnect. When opening a VM window
for a running VM, you'll see a 'Connect to console' button in place
of the spice/vnc viewer. Click that and things proceed like normal.

This is useful to prevent virt-manager from disconnecting a virt-viewer
instance that's already attached to a VM

https://bugzilla.redhat.com/show_bug.cgi?id=1793876

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 19:59:31 -04:00
Cole Robinson aafb874c85 viewers: Enable window modifiers when viewer doesn't have keyboard
Right now this is tied to widget focus, which is too strong. This
changes it so that say clicking on the window title or toolbar then
allows the user to use Alt+F to trigger the File menu for example.
This roughly matches how virt-viewer works

https://bugzilla.redhat.com/show_bug.cgi?id=1824480

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 11:25:50 -04:00
Cole Robinson b88e755a52 console: Text console submenu improvements
* Move all the menu building to its own class, for clarity
* Rename the menu 'Consoles' since it contains graphical choice as well
* Strip out the VM console duplicate if it exists
* Simplify the code a bit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-09 08:49:12 -04:00
Cole Robinson 92b46245bd uitests: finish connection, connectauth
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-09-05 15:49:55 -04:00
Cole Robinson 38405a477c tests: Add *DIR helper variables
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 14:23:24 -04:00
Cole Robinson c36f232370 uitests: Finish console.py and viewers.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-30 10:34:44 -04:00
Cole Robinson e414fc3bdc viewers: Drop old style VNC socket handling
In all modern local cases we will be using openFD to get a direct
file descriptor from the VM, so this code should never be triggered
nowadays

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 16:49:52 -04:00
Cole Robinson 64e3ff1d08 uitests: console/keyring/viewer coverage work
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 13:23:34 -04:00
Cole Robinson e9c937691d uitests: Finish serialcon.py coverage
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-29 12:37:12 -04:00
Cole Robinson a289676574 uitests: More use of safer utility helpers
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-27 18:10:11 -04:00
Cole Robinson dc41f61e5e uitests: Add combo selection helpers and use them
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:06 -04:00
Cole Robinson 73b61ffbc9 uitests: Use our loop check() helper for all asserts
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:06 -04:00
Cole Robinson 7342d9a11b uitests: Add _click_alert_button helper
Centralizes a pattern we were using all over the place

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-08-26 15:20:05 -04:00
Cole Robinson 01eb65bd61 tests: Don't report UID/GID in fake caps data
Otherwise uitests can have different behavior depending on host state

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson ac202f40ac tests: uitests: Fix live hotplug test after delete rework
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:44:41 -05:00
Cole Robinson e784376699 tests: Rename all test files to have test_ prefix
This will help for a possible future conversion to pytest

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-27 06:57:37 -05:00