GNOME apps: dismiss new LibreOffice 'tip of the day' if it shows

Also add a new needle for Impress startup.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-07-23 17:10:13 -07:00
parent 17438386c1
commit be12f07900
19 changed files with 76 additions and 19 deletions

View File

@ -7,7 +7,7 @@ use Exporter;
use lockapi; use lockapi;
use testapi; 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 { sub run_with_error_check {
my ($func, $error_screen) = @_; 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 { sub advisory_get_installed_packages {
# For update tests (this only works if we've been through # For update tests (this only works if we've been through
# _repo_setup_updates), figure out which packages from the update # _repo_setup_updates), figure out which packages from the update

View File

@ -10,6 +10,7 @@
], ],
"properties": [], "properties": [],
"tags": [ "tags": [
"apps_run_lcalc" "apps_run_lcalc",
"libreoffice_any"
] ]
} }

View File

@ -1,7 +1,8 @@
{ {
"properties": [], "properties": [],
"tags": [ "tags": [
"apps_run_lcalc" "apps_run_lcalc",
"libreoffice_any"
], ],
"area": [ "area": [
{ {

View File

@ -10,6 +10,7 @@
], ],
"properties": [], "properties": [],
"tags": [ "tags": [
"apps_run_ldraw" "apps_run_ldraw",
"libreoffice_any"
] ]
} }

View File

@ -1,7 +1,8 @@
{ {
"properties": [], "properties": [],
"tags": [ "tags": [
"apps_run_ldraw" "apps_run_ldraw",
"libreoffice_any"
], ],
"area": [ "area": [
{ {

View File

@ -10,6 +10,7 @@
], ],
"properties": [], "properties": [],
"tags": [ "tags": [
"apps_run_limpress_start" "apps_run_limpress_start",
"libreoffice_any"
] ]
} }

View File

@ -0,0 +1,16 @@
{
"area": [
{
"height": 19,
"width": 49,
"xpos": 724,
"ypos": 637,
"type": "match"
}
],
"properties": [],
"tags": [
"apps_run_limpress_start",
"libreoffice_any"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@ -1,7 +1,8 @@
{ {
"properties": [], "properties": [],
"tags": [ "tags": [
"apps_run_limpress_start" "apps_run_limpress_start",
"libreoffice_any"
], ],
"area": [ "area": [
{ {

View File

@ -10,6 +10,7 @@
], ],
"properties": [], "properties": [],
"tags": [ "tags": [
"apps_run_lwriter" "apps_run_lwriter",
"libreoffice_any"
] ]
} }

View File

@ -1,7 +1,8 @@
{ {
"properties": [], "properties": [],
"tags": [ "tags": [
"apps_run_lwriter" "apps_run_lwriter",
"libreoffice_any"
], ],
"area": [ "area": [
{ {

View File

@ -0,0 +1,15 @@
{
"area": [
{
"type": "match",
"ypos": 357,
"xpos": 234,
"width": 58,
"height": 48
}
],
"properties": [],
"tags": [
"libreoffice_tip"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -10,6 +10,8 @@ sub run {
# Start the application # Start the application
start_with_launcher('apps_menu_lcalc'); start_with_launcher('apps_menu_lcalc');
# Dismiss 'tip of the day' if necessary
lo_dismiss_tip;
# Check that is started # Check that is started
assert_screen 'apps_run_lcalc'; assert_screen 'apps_run_lcalc';
# Close the application # Close the application

View File

@ -10,6 +10,8 @@ sub run {
# Start the application # Start the application
start_with_launcher('apps_menu_ldraw'); start_with_launcher('apps_menu_ldraw');
# Dismiss 'tip of the day' if necessary
lo_dismiss_tip;
# Check that is started # Check that is started
assert_screen 'apps_run_ldraw'; assert_screen 'apps_run_ldraw';
# Close the application # Close the application

View File

@ -10,6 +10,8 @@ sub run {
# Start the application # Start the application
start_with_launcher('apps_menu_limpress'); start_with_launcher('apps_menu_limpress');
# Dismiss 'tip of the day' if necessary
lo_dismiss_tip;
# Check that is started # Check that is started
assert_and_click 'apps_run_limpress_start'; assert_and_click 'apps_run_limpress_start';
assert_screen 'apps_run_limpress'; assert_screen 'apps_run_limpress';

View File

@ -10,6 +10,8 @@ sub run {
# Start the application # Start the application
start_with_launcher('apps_menu_lwriter'); start_with_launcher('apps_menu_lwriter');
# Dismiss 'tip of the day' if necessary
lo_dismiss_tip;
# Check that is started # Check that is started
assert_screen 'apps_run_lwriter'; assert_screen 'apps_run_lwriter';
# Close the application # Close the application