diff --git a/lib/utils.pm b/lib/utils.pm index 768115fc..abab7f35 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -7,7 +7,7 @@ use Exporter; use lockapi; use testapi; -our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type start_cockpit repo_setup gnome_initial_setup anaconda_create_user check_desktop_clean download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile bypass_1691487 get_release_number _assert_and_click click_unwanted_notifications/; +our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type start_cockpit repo_setup gnome_initial_setup anaconda_create_user check_desktop_clean download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut lo_dismiss_tip disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile bypass_1691487 get_release_number _assert_and_click click_unwanted_notifications/; sub run_with_error_check { my ($func, $error_screen) = @_; @@ -746,6 +746,16 @@ sub quit_with_shortcut { } + +sub lo_dismiss_tip { + # identify and close a 'tip of the day' window that shows on start + # of all LibreOffice apps. For the 'app startup' tests. + assert_screen ["libreoffice_tip", "libreoffice_any"]; + # we use check_screen here just in case both needles match and + # libreoffice_any 'won' + send_key 'esc' if (check_screen "libreoffice_tip", 2); +} + sub advisory_get_installed_packages { # For update tests (this only works if we've been through # _repo_setup_updates), figure out which packages from the update diff --git a/needles/gnome/apps/apps_run_lcalc-20190220.json b/needles/gnome/apps/apps_run_lcalc-20190220.json index efafaf38..cc0e09f8 100644 --- a/needles/gnome/apps/apps_run_lcalc-20190220.json +++ b/needles/gnome/apps/apps_run_lcalc-20190220.json @@ -10,6 +10,7 @@ ], "properties": [], "tags": [ - "apps_run_lcalc" + "apps_run_lcalc", + "libreoffice_any" ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_lcalc.json b/needles/gnome/apps/apps_run_lcalc.json index 2bd10e4e..091877eb 100644 --- a/needles/gnome/apps/apps_run_lcalc.json +++ b/needles/gnome/apps/apps_run_lcalc.json @@ -1,7 +1,8 @@ { "properties": [], "tags": [ - "apps_run_lcalc" + "apps_run_lcalc", + "libreoffice_any" ], "area": [ { @@ -12,4 +13,4 @@ "type": "match" } ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_ldraw-20190220.json b/needles/gnome/apps/apps_run_ldraw-20190220.json index 901307c5..d6004b79 100644 --- a/needles/gnome/apps/apps_run_ldraw-20190220.json +++ b/needles/gnome/apps/apps_run_ldraw-20190220.json @@ -10,6 +10,7 @@ ], "properties": [], "tags": [ - "apps_run_ldraw" + "apps_run_ldraw", + "libreoffice_any" ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_ldraw.json b/needles/gnome/apps/apps_run_ldraw.json index 27c31eda..9d4a4de6 100644 --- a/needles/gnome/apps/apps_run_ldraw.json +++ b/needles/gnome/apps/apps_run_ldraw.json @@ -1,7 +1,8 @@ { "properties": [], "tags": [ - "apps_run_ldraw" + "apps_run_ldraw", + "libreoffice_any" ], "area": [ { @@ -12,4 +13,4 @@ "type": "match" } ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_limpress-20190220.json b/needles/gnome/apps/apps_run_limpress-20190220.json index 9caa0d7c..222a9d34 100644 --- a/needles/gnome/apps/apps_run_limpress-20190220.json +++ b/needles/gnome/apps/apps_run_limpress-20190220.json @@ -12,4 +12,4 @@ "tags": [ "apps_run_limpress" ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_limpress.json b/needles/gnome/apps/apps_run_limpress.json index 762add45..b7ba4fb6 100644 --- a/needles/gnome/apps/apps_run_limpress.json +++ b/needles/gnome/apps/apps_run_limpress.json @@ -12,4 +12,4 @@ "type": "match" } ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_limpress_start-20190220.json b/needles/gnome/apps/apps_run_limpress_start-20190220.json index 13207d32..fc3f4f2a 100644 --- a/needles/gnome/apps/apps_run_limpress_start-20190220.json +++ b/needles/gnome/apps/apps_run_limpress_start-20190220.json @@ -10,6 +10,7 @@ ], "properties": [], "tags": [ - "apps_run_limpress_start" + "apps_run_limpress_start", + "libreoffice_any" ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_limpress_start-20190724.json b/needles/gnome/apps/apps_run_limpress_start-20190724.json new file mode 100644 index 00000000..71460f43 --- /dev/null +++ b/needles/gnome/apps/apps_run_limpress_start-20190724.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "height": 19, + "width": 49, + "xpos": 724, + "ypos": 637, + "type": "match" + } + ], + "properties": [], + "tags": [ + "apps_run_limpress_start", + "libreoffice_any" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/apps_run_limpress_start-20190724.png b/needles/gnome/apps/apps_run_limpress_start-20190724.png new file mode 100644 index 00000000..8bfdf6ae Binary files /dev/null and b/needles/gnome/apps/apps_run_limpress_start-20190724.png differ diff --git a/needles/gnome/apps/apps_run_limpress_start.json b/needles/gnome/apps/apps_run_limpress_start.json index cf0f83e1..87070fad 100644 --- a/needles/gnome/apps/apps_run_limpress_start.json +++ b/needles/gnome/apps/apps_run_limpress_start.json @@ -1,7 +1,8 @@ { "properties": [], "tags": [ - "apps_run_limpress_start" + "apps_run_limpress_start", + "libreoffice_any" ], "area": [ { @@ -12,4 +13,4 @@ "type": "match" } ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_lwriter-20190220.json b/needles/gnome/apps/apps_run_lwriter-20190220.json index ee924ada..c784af43 100644 --- a/needles/gnome/apps/apps_run_lwriter-20190220.json +++ b/needles/gnome/apps/apps_run_lwriter-20190220.json @@ -10,6 +10,7 @@ ], "properties": [], "tags": [ - "apps_run_lwriter" + "apps_run_lwriter", + "libreoffice_any" ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/apps_run_lwriter.json b/needles/gnome/apps/apps_run_lwriter.json index 4ff1057c..84021f53 100644 --- a/needles/gnome/apps/apps_run_lwriter.json +++ b/needles/gnome/apps/apps_run_lwriter.json @@ -1,7 +1,8 @@ { "properties": [], "tags": [ - "apps_run_lwriter" + "apps_run_lwriter", + "libreoffice_any" ], "area": [ { @@ -12,4 +13,4 @@ "type": "match" } ] -} \ No newline at end of file +} diff --git a/needles/gnome/apps/libreoffice_tip-20190724.json b/needles/gnome/apps/libreoffice_tip-20190724.json new file mode 100644 index 00000000..ce85de5c --- /dev/null +++ b/needles/gnome/apps/libreoffice_tip-20190724.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "type": "match", + "ypos": 357, + "xpos": 234, + "width": 58, + "height": 48 + } + ], + "properties": [], + "tags": [ + "libreoffice_tip" + ] +} \ No newline at end of file diff --git a/needles/gnome/apps/libreoffice_tip-20190724.png b/needles/gnome/apps/libreoffice_tip-20190724.png new file mode 100644 index 00000000..ae2e583c Binary files /dev/null and b/needles/gnome/apps/libreoffice_tip-20190724.png differ diff --git a/tests/apps_startstop/gnome/lcalc.pm b/tests/apps_startstop/gnome/lcalc.pm index 14ea088b..03ea3e61 100644 --- a/tests/apps_startstop/gnome/lcalc.pm +++ b/tests/apps_startstop/gnome/lcalc.pm @@ -10,6 +10,8 @@ sub run { # Start the application start_with_launcher('apps_menu_lcalc'); + # Dismiss 'tip of the day' if necessary + lo_dismiss_tip; # Check that is started assert_screen 'apps_run_lcalc'; # Close the application diff --git a/tests/apps_startstop/gnome/ldraw.pm b/tests/apps_startstop/gnome/ldraw.pm index 8775c358..222084ab 100644 --- a/tests/apps_startstop/gnome/ldraw.pm +++ b/tests/apps_startstop/gnome/ldraw.pm @@ -10,6 +10,8 @@ sub run { # Start the application start_with_launcher('apps_menu_ldraw'); + # Dismiss 'tip of the day' if necessary + lo_dismiss_tip; # Check that is started assert_screen 'apps_run_ldraw'; # Close the application diff --git a/tests/apps_startstop/gnome/limpress.pm b/tests/apps_startstop/gnome/limpress.pm index 6a6126f0..d8c319f4 100644 --- a/tests/apps_startstop/gnome/limpress.pm +++ b/tests/apps_startstop/gnome/limpress.pm @@ -10,6 +10,8 @@ sub run { # Start the application start_with_launcher('apps_menu_limpress'); + # Dismiss 'tip of the day' if necessary + lo_dismiss_tip; # Check that is started assert_and_click 'apps_run_limpress_start'; assert_screen 'apps_run_limpress'; diff --git a/tests/apps_startstop/gnome/lwriter.pm b/tests/apps_startstop/gnome/lwriter.pm index 1bf99545..f82edf02 100644 --- a/tests/apps_startstop/gnome/lwriter.pm +++ b/tests/apps_startstop/gnome/lwriter.pm @@ -10,6 +10,8 @@ sub run { # Start the application start_with_launcher('apps_menu_lwriter'); + # Dismiss 'tip of the day' if necessary + lo_dismiss_tip; # Check that is started assert_screen 'apps_run_lwriter'; # Close the application