Tweak KDE update notification handling again

On current F34 we get no permanent update notification in the
notifications view, we only get a *transient* one plus the
systray icon. This tweaks things so on F34 we check both of
those things correctly, behaviour on <F34 should be unchanged.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2021-04-02 17:00:07 -07:00
parent de87c3f28e
commit c7173ef0e2
3 changed files with 48 additions and 7 deletions

View File

@ -0,0 +1,24 @@
{
"area": [
{
"type": "match",
"xpos": 660,
"width": 133,
"height": 17,
"ypos": 596
},
{
"ypos": 323,
"height": 13,
"xpos": 199,
"width": 13,
"type": "match"
}
],
"properties": [],
"tags": [
"DESKTOP-kde",
"desktop_update_notification_popup",
"desktop_update_notification"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 939 KiB

View File

@ -13,6 +13,7 @@ use packagetest;
sub run { sub run {
my $self = shift; my $self = shift;
my $desktop = get_var("DESKTOP"); my $desktop = get_var("DESKTOP");
my $relnum = get_release_number;
# for the live image case, handle bootloader here # for the live image case, handle bootloader here
if (get_var("BOOTFROM")) { if (get_var("BOOTFROM")) {
do_bootloader(postinstall=>1, params=>'3'); do_bootloader(postinstall=>1, params=>'3');
@ -75,12 +76,15 @@ sub run {
send_key 'ret'; send_key 'ret';
} }
check_desktop(timeout=>90); check_desktop(timeout=>90);
# now, WE WAIT. this is just an unconditional wait - rather than # now, WE WAIT. Because KDE on F34+ shows a notification only
# breaking if we see an update notification appear - so we catch # briefly we will keep an eye out and record if we saw it (logic
# things that crash a few minutes after startup, etc. # around this comes later). But we wait the whole ten minutes even
# if we see it so we catch any unwanted notifications that appear
# shortly after boot
my $seen = 0;
for my $n (1..16) { for my $n (1..16) {
sleep 30; $seen = 1 if (check_screen "desktop_update_notification", 30);
mouse_set 10, 10; mouse_set 20, 20;
send_key "spc"; send_key "spc";
mouse_hide; mouse_hide;
} }
@ -114,12 +118,25 @@ sub run {
} }
} }
if (get_var("BOOTFROM")) { if (get_var("BOOTFROM")) {
if ($desktop eq 'kde' && $relnum > 33) {
# there is no permanent notification in F34+, check we saw
# the transient one earlier and we see no others now
assert_screen "desktop_no_notifications";
die "No update notification was shown!" unless $seen;
}
else {
# we should see an update notification and no others # we should see an update notification and no others
assert_screen "desktop_update_notification_only"; assert_screen "desktop_update_notification_only";
} }
}
else { else {
# for the live case there should be *no* notifications # for the live case there should be *no* notifications
assert_screen "desktop_no_notifications"; assert_screen "desktop_no_notifications";
if ($desktop eq 'kde' && $relnum > 33) {
# and no tray icon either
die "Systray update notification should not be present on live!" if (check_screen "desktop_update_notification_systray");
die "Transient notification should not be shown on live!" if $seen;
}
} }
} }