diff --git a/needles/gnome/desktop_no_notifications.json b/needles/gnome/desktop_no_notifications.json new file mode 100644 index 00000000..fc81378c --- /dev/null +++ b/needles/gnome/desktop_no_notifications.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 47, + "type": "match", + "width": 47, + "xpos": 345, + "ypos": 249 + } + ], + "tags": [ + "desktop_no_notifications", + "DESKTOP-gnome" + ] +} diff --git a/needles/gnome/desktop_no_notifications.png b/needles/gnome/desktop_no_notifications.png new file mode 100644 index 00000000..2ede15bb Binary files /dev/null and b/needles/gnome/desktop_no_notifications.png differ diff --git a/needles/gnome/desktop_update_notification_only.json b/needles/gnome/desktop_update_notification_only.json new file mode 100644 index 00000000..f597f00d --- /dev/null +++ b/needles/gnome/desktop_update_notification_only.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "height": 95, + "type": "match", + "width": 40, + "xpos": 170, + "ypos": 90 + } + ], + "tags": [ + "desktop_update_notification_only", + "DESKTOP-gnome" + ] +} diff --git a/needles/gnome/desktop_update_notification_only.png b/needles/gnome/desktop_update_notification_only.png new file mode 100644 index 00000000..f827d9d7 Binary files /dev/null and b/needles/gnome/desktop_update_notification_only.png differ diff --git a/needles/kde/desktop_expand_notifications.json b/needles/kde/desktop_expand_systray.json similarity index 84% rename from needles/kde/desktop_expand_notifications.json rename to needles/kde/desktop_expand_systray.json index 1a3b08ef..a5d5d7fa 100644 --- a/needles/kde/desktop_expand_notifications.json +++ b/needles/kde/desktop_expand_systray.json @@ -10,7 +10,7 @@ ], "tags": [ "DESKTOP-kde", - "desktop_expand_notifications" + "desktop_expand_systray" ], "properties": [] } diff --git a/needles/kde/desktop_expand_notifications.png b/needles/kde/desktop_expand_systray.png similarity index 100% rename from needles/kde/desktop_expand_notifications.png rename to needles/kde/desktop_expand_systray.png diff --git a/needles/kde/desktop_no_notifications.json b/needles/kde/desktop_no_notifications.json new file mode 100644 index 00000000..90de1375 --- /dev/null +++ b/needles/kde/desktop_no_notifications.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 651, + "ypos": 436, + "width": 198, + "height": 25, + "type": "match" + } + ], + "tags": [ + "desktop_no_notifications" + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/kde/desktop_no_notifications.png b/needles/kde/desktop_no_notifications.png new file mode 100644 index 00000000..2946afac Binary files /dev/null and b/needles/kde/desktop_no_notifications.png differ diff --git a/needles/kde/desktop_systray_notifications.json b/needles/kde/desktop_systray_notifications.json new file mode 100644 index 00000000..0953008c --- /dev/null +++ b/needles/kde/desktop_systray_notifications.json @@ -0,0 +1,16 @@ +{ + "properties": [], + "tags": [ + "DESKTOP-kde", + "desktop_systray_notifications" + ], + "area": [ + { + "xpos": 641, + "ypos": 443, + "width": 83, + "height": 16, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/kde/desktop_systray_notifications.png b/needles/kde/desktop_systray_notifications.png new file mode 100644 index 00000000..f824fe59 Binary files /dev/null and b/needles/kde/desktop_systray_notifications.png differ diff --git a/needles/kde/desktop_update_notification_only.json b/needles/kde/desktop_update_notification_only.json new file mode 100644 index 00000000..d98d95b0 --- /dev/null +++ b/needles/kde/desktop_update_notification_only.json @@ -0,0 +1,22 @@ +{ + "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-kde" + ] +} diff --git a/needles/kde/desktop_update_notification_only.png b/needles/kde/desktop_update_notification_only.png new file mode 100644 index 00000000..f46cb7c3 Binary files /dev/null and b/needles/kde/desktop_update_notification_only.png differ diff --git a/templates b/templates index ee909aea..5a57ca83 100755 --- a/templates +++ b/templates @@ -369,6 +369,50 @@ }, test_suite => { name => "desktop_browser" }, }, + { + machine => { name => "64bit" }, + prio => 30, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "Workstation-live-iso", + version => "*", + }, + test_suite => { name => "desktop_notifications_live" }, + }, + { + machine => { name => "64bit" }, + prio => 32, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "KDE-live-iso", + version => "*", + }, + test_suite => { name => "desktop_notifications_live" }, + }, + { + machine => { name => "64bit" }, + prio => 30, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "Workstation-live-iso", + version => "*", + }, + test_suite => { name => "desktop_notifications_postinstall" }, + }, + { + machine => { name => "64bit" }, + prio => 32, + product => { + arch => "x86_64", + distri => "fedora", + flavor => "KDE-live-iso", + version => "*", + }, + test_suite => { name => "desktop_notifications_postinstall" }, + }, { machine => { name => "64bit" }, prio => 30, @@ -2127,6 +2171,21 @@ { key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" }, ], }, + { + name => "desktop_notifications_postinstall", + settings => [ + { key => "POSTINSTALL", value => "desktop_notifications" }, + { key => "START_AFTER_TEST", value => "install_default_upload" }, + { key => "BOOTFROM", value => "c" }, + { key => "HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" }, + ], + }, + { + name => "desktop_notifications_live", + settings => [ + { key => "ENTRYPOINT", value => "desktop_notifications_postinstall" }, + ], + }, { name => "install_kickstart_nfs", settings => [ diff --git a/tests/desktop_notifications_postinstall.pm b/tests/desktop_notifications_postinstall.pm new file mode 100644 index 00000000..3f328d2f --- /dev/null +++ b/tests/desktop_notifications_postinstall.pm @@ -0,0 +1,71 @@ +use base "installedtest"; +use strict; +use testapi; +use main_common; +use packagetest; + +# This test sort of covers QA:Testcase_desktop_update_notification +# and QA:Testcase_desktop_error_checks . If it fails, probably *one* +# of those failed, but we don't know which (deciphering which is +# tricky and involves likely-fragile needles to try and figure out +# what notifications we have). + +sub run { + my $self = shift; + # for the live image case, handle bootloader here + unless (get_var("BOOTFROM")) { + $self->do_bootloader(postinstall=>0); + } + assert_screen "graphical_desktop_clean", 300; + # ensure we actually have some package updates available + # we're kinda theoretically racing with the update check here, + # but we have no great way to handle that especially live; let's + # just assume we're gonna win + $self->root_console(tty=>3); + prepare_test_packages; + $self->desktop_vt(); + # now, WE WAIT. this is just an unconditional wait - rather than + # breaking if we see an update notification appear - so we catch + # things that crash a few minutes after startup, etc. + for my $n (1..5) { + sleep 120; + mouse_set 10, 10; + mouse_hide; + } + my $desktop = get_var("DESKTOP"); + 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 + mouse_set 512, 10; + mouse_click; + } + elsif ($desktop eq 'kde' && !get_var("BOOTFROM")) { + # 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'; + } + if (get_var("BOOTFROM")) { + # we should see an update notification and no others + check_screen "desktop_update_notification_only"; + } + else { + # for the live case there should be *no* notifications + assert_screen "desktop_no_notifications"; + } +} + + +sub test_flags { + # without anything - rollback to 'lastgood' snapshot if failed + # 'fatal' - whole test suite is in danger if this fails + # 'milestone' - after this test succeeds, update 'lastgood' + # 'important' - if this fails, set the overall state to 'fail' + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/desktop_update_graphical_postinstall.pm b/tests/desktop_update_graphical_postinstall.pm index d97aa97c..4bed9402 100644 --- a/tests/desktop_update_graphical_postinstall.pm +++ b/tests/desktop_update_graphical_postinstall.pm @@ -16,7 +16,7 @@ sub run { if ($desktop eq 'kde') { # KDE team tells me the 'preferred' update method is the # systray applet - assert_and_click 'desktop_expand_notifications'; + assert_and_click 'desktop_expand_systray'; } else { # this launches GNOME Software on GNOME, dunno for any other