diff --git a/needles/kde/desktop_icon_notifications-kde-20201015.json b/needles/kde/desktop_icon_notifications-kde-20201015.json new file mode 100644 index 00000000..2b73dcde --- /dev/null +++ b/needles/kde/desktop_icon_notifications-kde-20201015.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "xpos": 750, + "ypos": 741, + "width": 18, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "DESKTOP-kde", + "desktop_icon_notifications" + ] +} \ No newline at end of file diff --git a/needles/kde/desktop_icon_notifications-kde-20201015.png b/needles/kde/desktop_icon_notifications-kde-20201015.png new file mode 100644 index 00000000..a3155110 Binary files /dev/null and b/needles/kde/desktop_icon_notifications-kde-20201015.png differ diff --git a/needles/kde/desktop_icon_notifications-kde-f32-20201015.json b/needles/kde/desktop_icon_notifications-kde-f32-20201015.json new file mode 100644 index 00000000..b13bda76 --- /dev/null +++ b/needles/kde/desktop_icon_notifications-kde-f32-20201015.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "height": 18, + "width": 18, + "ypos": 741, + "type": "match", + "xpos": 748 + } + ], + "properties": [], + "tags": [ + "DESKTOP-kde", + "desktop_icon_notifications" + ] +} \ No newline at end of file diff --git a/needles/kde/desktop_icon_notifications-kde-f32-20201015.png b/needles/kde/desktop_icon_notifications-kde-f32-20201015.png new file mode 100644 index 00000000..0b68c02c Binary files /dev/null and b/needles/kde/desktop_icon_notifications-kde-f32-20201015.png differ diff --git a/needles/kde/desktop_update_notification_only-kde-20200929.json b/needles/kde/desktop_update_notification_only-kde-20200929.json deleted file mode 100644 index ec7fd885..00000000 --- a/needles/kde/desktop_update_notification_only-kde-20200929.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "properties": [], - "tags": [ - "desktop_update_notification" - ], - "area": [ - { - "xpos": 775, - "ypos": 740, - "width": 23, - "height": 22, - "type": "match" - } - ] -} \ No newline at end of file diff --git a/needles/kde/desktop_update_notification_only-kde-20201014.json b/needles/kde/desktop_update_notification_only-kde-20201014.json new file mode 100644 index 00000000..9f4439e6 --- /dev/null +++ b/needles/kde/desktop_update_notification_only-kde-20201014.json @@ -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" + ] +} diff --git a/needles/kde/desktop_update_notification_only-kde-20201014.png b/needles/kde/desktop_update_notification_only-kde-20201014.png new file mode 100644 index 00000000..b6906450 Binary files /dev/null and b/needles/kde/desktop_update_notification_only-kde-20201014.png differ diff --git a/needles/kde/desktop_update_notification_only-kde.json b/needles/kde/desktop_update_notification_only-kde.json deleted file mode 100644 index 15e12e7e..00000000 --- a/needles/kde/desktop_update_notification_only-kde.json +++ /dev/null @@ -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" - ] -} diff --git a/needles/kde/desktop_update_notification_only-kde.png b/needles/kde/desktop_update_notification_only-kde.png deleted file mode 100644 index f46cb7c3..00000000 Binary files a/needles/kde/desktop_update_notification_only-kde.png and /dev/null differ diff --git a/needles/kde/desktop_update_notification_systray-kde-20200929.json b/needles/kde/desktop_update_notification_systray-kde-20200929.json new file mode 100644 index 00000000..4a1fd520 --- /dev/null +++ b/needles/kde/desktop_update_notification_systray-kde-20200929.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 18, + "type": "match", + "width": 18, + "xpos": 776, + "ypos": 741 + } + ], + "properties": [], + "tags": [ + "desktop_update_notification_systray" + ] +} \ No newline at end of file diff --git a/needles/kde/desktop_update_notification_only-kde-20200929.png b/needles/kde/desktop_update_notification_systray-kde-20200929.png similarity index 100% rename from needles/kde/desktop_update_notification_only-kde-20200929.png rename to needles/kde/desktop_update_notification_systray-kde-20200929.png diff --git a/needles/kde/desktop_update_notification_systray-kde-20201014.json b/needles/kde/desktop_update_notification_systray-kde-20201014.json new file mode 100644 index 00000000..cb5f1a57 --- /dev/null +++ b/needles/kde/desktop_update_notification_systray-kde-20201014.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 18, + "xpos": 778, + "type": "match", + "ypos": 741, + "width": 18 + } + ], + "properties": [], + "tags": [ + "desktop_update_notification_systray" + ] +} \ No newline at end of file diff --git a/needles/kde/desktop_update_notification_systray-kde-20201014.png b/needles/kde/desktop_update_notification_systray-kde-20201014.png new file mode 100644 index 00000000..903f98db Binary files /dev/null and b/needles/kde/desktop_update_notification_systray-kde-20201014.png differ diff --git a/tests/desktop_notifications.pm b/tests/desktop_notifications.pm index 28426a6c..50a07850 100644 --- a/tests/desktop_notifications.pm +++ b/tests/desktop_notifications.pm @@ -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"; } }