This PR adds a test for a new Image Viewer called Loupe.
It is based on the old Image Viewer test, newly reneedled
with some of the tests shortened, deleted or edited
as the new Image Viewer has a little bit less functions
compared to the previous one.
Add needles.
Loupe's Open dialog defaults to Recent, not Pictures, so when
we're using Loupe we need to click into Pictures to find the
exported image.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Loupe has replaced EOG on F39 and Rawhide, and it can be found
with "image viewer", so let's just go with that. The rest of the
logic should be OK but we will likely need some new needles,
will do that next.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
EOG has been replaced by Loupe in F39+. We will need to add a
test for Loupe, but first let's remove the EOG test so it does
not fail on every compose.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The Flatpak build doesn't have the spellcheck issue at the
moment, and it may be fixed soon in the RPM build. Trying to
'fix' the issue on the flatpak build actually makes the test
fail. So, let's only do the fix if we actually have a misspelled
word.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The tests after it assume new_file ran - they rely on the file
it creates - so it should be considered fatal.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Seems in Rawhide the menu is loading without dividers briefly,
we match there, then the dividers load in and make the menu
longer, so when we click, we hit a different entry in the menu.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The editor started to show spell-checking that would require a lot
of new needles to be created. Theredore, we set the language to
English to stop showing the spelling mistakes in aaa_setup.pm
Also, the application started to have problems with getting correct
focus, so we want to click into the text before the status gets
recorded.
The shifted characters here frequently get mistyped. Let's use
type_safely. If this isn't enough we can try very_safely.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This was resolved upstream and we're no longer hitting this bug
in tests on F38, Rawhide or even F37 respins, so we should no
longer need this workaround.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This keeps failing on the accessibility section, and looking at
the screenshots I realized why. When you press 'down', GNOME
doesn't just 'snap' to the new view, it does a smooth downward
scroll. We're often matching *while it's scrolling*, so the
needle match is right at the bottom of the screen. But then the
animation continues, so when we get to the click action (even
though we use click_lastmatch it's not *instant* in openQA),
the thing we're trying to click (the "Accessibility" section
title) is a bit further up the screen, and the click 'misses'.
So, we need to wait out the scroll then re-assert and click.
This unfortunately will make the test take about 30 seconds
longer, but I don't see another way to do it. We could maybe
shave the wait_still_screen to one second...
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Similar to the dedicated tests for these apps, the app can appear
for a split second before the access request, so we match on the
app and don't realize we need to click through the access
request. Handle this the same way we do in the dedicated tests.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We're constantly seeing this test fail on an odd problem where
text editor starts *behind* characters. To handle this, check
if we see text editor and if not, hit alt-tab.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
It always launches in basic mode anyway, and sometimes this key
press doesn't work right and leaves a stray 'b' in the entry
field, which messes things up when we get to the calculation
tests.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Try and make sure maximize actually works - wait for still screen
after hitting Done and before trying to maximize.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
There's a failure mode we hit quite often where, when we run
the text editor after copying the character, it pops up *behind*
the character page. So let's close the page first. When we click
the 'Copy Character' button a notification that the character was
copied is briefly displayed and if we hit esc while it's visible
we dismiss *that* not the character page, so hit esc twice to be
safe. If we miss dismissing the notification, the 'extra' press
is safe, it doesn't quit the app.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
See e.g. https://openqa.fedoraproject.org/tests/1829593
sometimes we see the app UI briefly before the access prompt
appears. Handle that case by waiting a few seconds and doing
the match again.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Contacts now has two burger menus, which is awkward. We need
specific needles to identify each, we can't rely on the generic
needle any more as it won't always open the right menu. We also
need to still work with the old UI for the flatpak.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This PR adds a small test suite to test the Characters applications.
It displays several different groups of characters and then tries
to copy one of the characters and place it into a text editor.
* Scarborough provided quite a messy map that resulted
in frequent needle failure. Changing the location
for something better to make it more reliable.
* The zoom test could have failed with a low resolution
image. Adding some timeout to the needle give more
time to load the proper image.
This reverts the last few commits which worked around a focus bug
in GTK. This bug is now (I hope) fixed, so I'm dropping the
workarounds so the tests will confirm whether it's fixed.
We've seen some failures of the weather test at the start of
weather_report, where the test expects to be at the hourly view,
and instead it seems to be at a sort of broken state:
https://openqa.fedoraproject.org/tests/1505080#step/weather_report/3
I'm guessing this may be because currently aaa_setup clicks the
city name then is immediately complete, so it will immediately
snapshot. I guess this can result in things being stuck in a kind
of intermediate state on snapshot restore. So, to try and avoid
this, let's assert that we reach the hourly view after clicking
the city name, then wait_still_screen for a few seconds to make
sure things are settled down, before we complete and snapshot.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This will make them slower, but lately type_safely is just not
reliable, particularly in the new_file test, it's constantly
typoing.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We need to move the mouse out of the way so we don't need two
needles for "X not highlighted" and "X highlighted", and give
the check_screen a few seconds to update for the cursor move.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
"Star" was removed from the file context menu, so we have to
star the file from the main view now.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
We had a ton of needles all covering something very similar
(press a "Credits" button in a GNOME app). There are about four
real variations: old-style regular face white-on-black (eog),
old-style regular face (nautilus and evince before recent
libadwaita ports), old-style bold face (GTE and Clocks before
new libadwaita), and new-style (everything that's been ported
to use libadwaita for its About page). Let's just rationalize
it down to those, using the same needle tag for all of them.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The city is called Reykjavík (note the í). Previously our search
worked because the search function also looked in the name of the
timezone, and the *timezone* name is "Atlantic/Reykjavik" - i.e.
it's really Latin-ized in the name of the timezone. However,
upstream intentionally stopped including the timezone name in
search matches:
https://gitlab.gnome.org/GNOME/gnome-clocks/-/merge_requests/199
so that doesn't work any more. Just searching for "Reykjav"
should solve the problem.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
In 43-alpha it's gone, the replacement is Troubleshooting ->
Debugging Information. But it would be a pain to write two
forks in the code for handling both cases, and there's a ton
more stuff in the new-style About dialog that we're not
checking either. I don't think we really need to click on all
of it, and this bit of it isn't super important. So on the
whole I'd rather just keep things simple and drop this check.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
the new_file test failed today because it seems g-t-e now pre-
fills a suggested filename, with extension, and pre-selects the
name part but not the extension part. So when we type 'list.md'
we wound up saving the file as 'list.md.md'. I think hitting
ctrl-a should fix this, and not break when run on older versions
of g-t-e if we ever do that.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
aarch64 looks like it often needs more time to settle after
restoring from snapshot before trying a key combo.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
That last commit to 'fix' the Clocks tests when Silverblue needs
location access to be granted wasn't complete, I left the needle
out. D'oh. Take the chance to give it a better name too.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This PR changes the way to download the test data into the VM.
Although it does not use a disk image as suggested in one
of the review, it does not clone the entire repository, but
a simple tar.gz file that holds the data which will be
distributed into the directory structure.
This way, the amount of data needed to be downloaded dropped
from approximately 50MB to below 2MB.
Also, the existing test suites were adapted to this situation.
Clocks' aaa_setup did not ever actually check the app launched
properly. It also doesn't handle granting permissions if
necessary, which the apps_startstop test for Clocks does do.
This makes the permission check in the apps_startstop test more
efficient, and adds it to the Clocks app aaa_setup test too.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
There's a bug in the Save As... dialog on the flatpak version
of evince currently where the existing filename is not pre-
selected, so when the test types 'alternative', it gets
prepended to the existing filename instead of overwriting it,
and we wind up with alternativeevince.pdf, not alternative.pdf.
Let's treat this as a soft failure rather than a hard failure.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
On upgraded systems, gedit might still be present; remove it so
we don't launch it by accident and try to test it instead.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Silverblue still has an old version of g-t-e where this theming
stuff worked differently, so put that stuff back for Silverblue
but keep the new stuff for RPMs.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
So just type 'text-editor'. If you have both gedit and gte
installed this will find both, but that should never be the case
so it should be OK.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The latest version of Gnome-Text-Editor bring a little
bit different UI and some new or modified features.
This commit fixes the suite to run on newest version.
Workstation has replaced gedit with gnome-text-editor in Rawhide,
so this is no longer useful. We will replace it with a test suite
for gnome-text-editor.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
The open dialog on Silverblue (which is apparently not at all
the same thing as the open dialog on Workstation, though they
look the same) does not default to the Documents folder, so we
have to open it.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
`rpm` doesn't work. I dunno off-hand how you'd install git on
ostree if it wasn't there, so let's just assume it will be.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
This PR fixes issue #188. It adds a test suite to test basic
functionality of Evince and brings the following features:
* test scripts for various Evince functions.
* needles to support the Evince test scripts
* new template variables `TESTPATH` and `POSTINSTALL_LOAD_ALL` (see
below)
* new logic in `main.py` (see below)
The new variables and the new logic make it easier to create test
suites for post-installation tests. If TESTPATH is used, OpenQA
will take all tests mentioned in POSTINSTALL from that specified
TESTPATH. If both TESTPATH and POSTINSTALL_LOAD_ALL are used, then
OpenQA will run all tests it can find at the TESTPATH location.
If POSTINSTALL and POSTINSTALL_LOAD_ALL are set simultaneously,
then only POSTINSTALL will be taken into account and OpenQA will
only load tests mentioned there.