1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-24 23:03:08 +00:00

Try to handle changes to KDE update notifications in Rawhide

The way KDE does update notifications has changed - it's now a
permanent pop-up notification. This is a bit awkward for our
logic; it's hard to define a needle that proves this pop-up is
the only notification. Instead, let's dismiss it, then open the
notification tray and assert that there aren't any others. But
we also retain the old behaviour (more or less) for testing old
releases.

The popup notification also blocks the 'refresh' needle in the
systray and so breaks the desktop update test, so we deal with
that too.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-05-30 17:03:58 -07:00
parent 8b353a216a
commit 2e56facb68
6 changed files with 53 additions and 9 deletions

View File

@ -11,6 +11,7 @@
"properties": [],
"tags": [
"desktop_update_notification_only",
"desktop_update_notification",
"DESKTOP-gnome"
]
}
}

View File

@ -0,0 +1,24 @@
{
"area": [
{
"height": 40,
"type": "match",
"width": 38,
"xpos": 957,
"ypos": 666
},
{
"height": 13,
"type": "match",
"width": 13,
"xpos": 985,
"ypos": 643
}
],
"properties": [],
"tags": [
"DESKTOP-kde",
"desktop_update_notification_popup",
"desktop_update_notification"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 KiB

View File

@ -17,6 +17,7 @@
],
"tags": [
"desktop_update_notification_only",
"desktop_update_notification",
"DESKTOP-kde"
]
}

View File

@ -79,8 +79,25 @@ sub run {
# have to click where we know it is
mouse_set 512, 10;
mouse_click;
if (get_var("BOOTFROM")) {
# we should see an update notification and no others
assert_screen "desktop_update_notification_only";
}
else {
# for the live case there should be *no* notifications
assert_screen "desktop_no_notifications";
}
}
elsif ($desktop eq 'kde' && !get_var("BOOTFROM")) {
elsif ($desktop eq 'kde') {
if (get_var("BOOTFROM")) {
assert_screen "desktop_update_notification";
# this is the case from F30 and earlier where we know this
# was the *only* notification; at this point we've passed
return if match_has_tag "desktop_update_notification_only";
# otherwise, we need to close the update notification then
# check there are no others
assert_and_click "desktop_update_notification";
}
# the order and number of systray icons varies in KDE, so we
# can't really just use a systray 'no notifications' needle.
# instead open up the 'extended systray' thingy and click on
@ -92,13 +109,9 @@ sub run {
if (check_screen 'desktop_network_notification', 5) {
assert_and_click 'desktop_notification_dismiss';
}
}
if (get_var("BOOTFROM")) {
# we should see an update notification and no others
assert_screen "desktop_update_notification_only";
}
else {
# for the live case there should be *no* notifications
# on live path, we should not have got any other notification;
# on installed path, we saw an update notification and closed
# it, and now there should be no *other* notifications
assert_screen "desktop_no_notifications";
}
}

View File

@ -15,6 +15,11 @@ sub run {
desktop_vt;
# run the updater
if ($desktop eq 'kde') {
# if the permanent pop-up notification appeared, get rid of
# it, as it blocks the refresh button...
if (check_screen "desktop_update_notification_popup", 10) {
assert_and_click "desktop_update_notification_popup";
}
# KDE team tells me the 'preferred' update method is the
# systray applet
assert_and_click 'desktop_expand_systray';