Simplify desktop notification checks (#195)
This is the best option I can come up with to deal with #195. Update notifications seem to have become transient in KDE lately (even in F31 and F32, if I'm looking at these screenshots right). This actually simplifies things a lot to do more or less the same in the KDE and GNOME paths: open the 'permanent' store of notifications (in GNOME you get to it by clicking on the clock, in KDE via the systray) and then look for no notifications (live path) or only an update notification (post-install path). We only run this test for composes so we shouldn't need to worry about anything older than F32, and I believe this should work for KDE in F32 and F33. I left out click_unwanted_notifications for now as I'm hoping it should be unnecessary, but we can add it back in if necessary. Signed-off-by: Adam Williamson <awilliam@redhat.com>
16
needles/kde/desktop_icon_notifications-kde-20201015.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"xpos": 750,
|
||||
"ypos": 741,
|
||||
"width": 18,
|
||||
"height": 18,
|
||||
"type": "match"
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"DESKTOP-kde",
|
||||
"desktop_icon_notifications"
|
||||
]
|
||||
}
|
BIN
needles/kde/desktop_icon_notifications-kde-20201015.png
Normal file
After Width: | Height: | Size: 796 KiB |
16
needles/kde/desktop_icon_notifications-kde-f32-20201015.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 18,
|
||||
"width": 18,
|
||||
"ypos": 741,
|
||||
"type": "match",
|
||||
"xpos": 748
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"DESKTOP-kde",
|
||||
"desktop_icon_notifications"
|
||||
]
|
||||
}
|
BIN
needles/kde/desktop_icon_notifications-kde-f32-20201015.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
@ -1,15 +0,0 @@
|
||||
{
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"desktop_update_notification"
|
||||
],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 775,
|
||||
"ypos": 740,
|
||||
"width": 23,
|
||||
"height": 22,
|
||||
"type": "match"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 95,
|
||||
"type": "match",
|
||||
"width": 38,
|
||||
"xpos": 973,
|
||||
"ypos": 458
|
||||
},
|
||||
{
|
||||
"height": 16,
|
||||
"type": "match",
|
||||
"width": 206,
|
||||
"xpos": 628,
|
||||
"ypos": 457
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"DESKTOP-kde",
|
||||
"desktop_update_notification_only"
|
||||
]
|
||||
}
|
BIN
needles/kde/desktop_update_notification_only-kde-20201014.png
Normal file
After Width: | Height: | Size: 845 KiB |
@ -1,23 +0,0 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 18,
|
||||
"type": "match",
|
||||
"width": 18,
|
||||
"xpos": 663,
|
||||
"ypos": 743
|
||||
},
|
||||
{
|
||||
"height": 18,
|
||||
"type": "match",
|
||||
"width": 18,
|
||||
"xpos": 767,
|
||||
"ypos": 743
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"desktop_update_notification_only",
|
||||
"desktop_update_notification",
|
||||
"DESKTOP-kde"
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 538 KiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 18,
|
||||
"type": "match",
|
||||
"width": 18,
|
||||
"xpos": 776,
|
||||
"ypos": 741
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"desktop_update_notification_systray"
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
@ -0,0 +1,15 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 18,
|
||||
"xpos": 778,
|
||||
"type": "match",
|
||||
"ypos": 741,
|
||||
"width": 18
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"desktop_update_notification_systray"
|
||||
]
|
||||
}
|
BIN
needles/kde/desktop_update_notification_systray-kde-20201014.png
Normal file
After Width: | Height: | Size: 898 KiB |
@ -78,59 +78,40 @@ sub run {
|
||||
mouse_hide;
|
||||
}
|
||||
if ($desktop eq 'gnome') {
|
||||
# of course, we have no idea what'll be in the clock, so we just
|
||||
# have to click where we know it is
|
||||
# click the clock to show notifications. of course, we have no
|
||||
# idea what'll be in the clock, so we just 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') {
|
||||
if ($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(s)
|
||||
# then check there are no others; see
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1730482 for
|
||||
# KDE showing multiple notifications
|
||||
my @closed = click_unwanted_notifications;
|
||||
if (grep {$_ eq 'akonadi'} @closed) {
|
||||
# this isn't an SELinux denial or a crash, so it's not
|
||||
# a hard failure...
|
||||
record_soft_failure "stuck akonadi_migration_agent popup - RHBZ #1716005";
|
||||
}
|
||||
my @upnotes = grep {$_ eq 'update'} @closed;
|
||||
if (scalar @upnotes > 1) {
|
||||
# Also not a hard failure, but worth noting
|
||||
record_soft_failure "multiple update notifications - RHBZ #1730482";
|
||||
}
|
||||
# first check the systray update notification is there
|
||||
assert_screen "desktop_update_notification_systray";
|
||||
}
|
||||
# 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
|
||||
# the notifications bit
|
||||
assert_and_click 'desktop_expand_systray';
|
||||
assert_and_click 'desktop_systray_notifications';
|
||||
# In F28+ we seem to get a network connection notification
|
||||
# here. Let's dismiss it.
|
||||
if (check_screen 'desktop_network_notification', 5) {
|
||||
# now open the notifications view in the systray
|
||||
if (check_screen 'desktop_icon_notifications') {
|
||||
# this is the little bell thing KDE sometimes shows if
|
||||
# there's been a notification recently...
|
||||
click_lastmatch;
|
||||
}
|
||||
# In F32+ we may also get an 'akonadi did something' message
|
||||
else {
|
||||
# ...otherwise you have to expand the systray and click
|
||||
# "Notifications"
|
||||
assert_and_click 'desktop_expand_systray';
|
||||
assert_and_click 'desktop_systray_notifications';
|
||||
}
|
||||
# In F32+ we may get an 'akonadi did something' message
|
||||
if (check_screen 'akonadi_migration_notification', 5) {
|
||||
click_lastmatch;
|
||||
}
|
||||
# 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
|
||||
}
|
||||
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";
|
||||
}
|
||||
}
|
||||
|