Skip to content

Commit

Permalink
[ooffice] Close "Tip of the day" dialog in desktopapps-documentation-x11
Browse files Browse the repository at this point in the history
LibreOffice 6.3 shows a "Tip of the day" dialog. Unselect the
"Show tips on startup" checkbox and close it.

Related ticket: https://progress.opensuse.org/issues/54722
Verification run: https://openqa.opensuse.org/tests/1009986
  • Loading branch information
StefanBruens committed Aug 17, 2019
1 parent 5e61deb commit 9dc3a81
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions tests/x11/libreoffice/libreoffice_mainmenu_components.pm
Expand Up @@ -127,6 +127,15 @@ sub run {
type_string "calc"; #open calc
assert_and_click 'overview-office-calc';
assert_screen 'test-oocalc-1';
if (match_has_tag('ooffice-tip-of-the-day')) {
# Unselect "_S_how tips on startup", select "_O_k"
send_key "alt-s";
while (match_has_tag('ooffice-tip-of-the-day')) {
# make sure the dialog has really close before quiting with "ctrl-q"
wait_screen_change { send_key "alt-o" };
assert_screen 'test-oocalc-1';
}
}
send_key "ctrl-q"; #close calc

$self->open_overview();
Expand Down
7 changes: 6 additions & 1 deletion tests/x11/libreoffice/libreoffice_open_specified_file.pm
Expand Up @@ -24,7 +24,7 @@ sub run {
$self->upload_libreoffice_specified_file();

# start libreoffice
x11_start_program('libreoffice');
$self->libreoffice_start_program('libreoffice');

# open test files of different formats
my $i = 0;
Expand All @@ -36,6 +36,11 @@ sub run {
type_string_slow "/home/$username/Documents/ooo-test-doc-types/test.$tag\n";
wait_still_screen 3;
assert_screen("libreoffice-test-$tag", 120);
if (match_has_tag('ooffice-tip-of-the-day')) {
# Unselect "_S_how tips on startup", select "_O_k"
send_key "alt-s";
send_key "alt-o";
}
# Close every 3 files to reduce the VM's burden
if ($i % 3 == 0) { send_key_until_needlematch('libreoffice-test-doc', 'alt-f4', 5, 10); }
$i++;
Expand Down
4 changes: 3 additions & 1 deletion tests/x11/libreoffice/libreoffice_recent_documents.pm
Expand Up @@ -19,8 +19,10 @@ use utils;
use version_utils qw(is_sle is_tumbleweed);

sub run {
my ($self) = shift;

# Edit file hello.odt using oowriter
x11_start_program('oowriter');
$self->libreoffice_start_program('oowriter');
# clicking the writing area to make sure the cursor addressed there
assert_and_click('ooffice-writing-area', timeout => 10);
wait_still_screen;
Expand Down

0 comments on commit 9dc3a81

Please sign in to comment.