Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ooffice] Close "Tip of the day" dialog in desktopapps-documentation-x11 #8188

Merged
merged 1 commit into from Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/x11/libreoffice/libreoffice_mainmenu_components.pm
Expand Up @@ -127,6 +127,14 @@ 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";
send_key "alt-o";
while (match_has_tag('ooffice-tip-of-the-day')) {
assert_screen 'test-oocalc-1';
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this loop can be replaced by send_key_until_needlematch 'test-oocalc-1', 'alt-o';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but its 'send_key_while_needlematch` ...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is why suggested to look for test-oocalc-1 as the final picture assuming that the needle test-oocalc-1 would only match if the dialog is not shown. If it is not the case we could create proper new needles and delete older ambiguous one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, sorry. Read your comment in before that the needle is ambiguous. Still, what do you think about making that unambiguous and deleting all needles of tag test-oocalc-1 with the dialog shown?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on how many screen check iterations we would usually encounter it might make sense to have a short "sleep" period, e.g. sleep .1 after each step, WDYT?

}
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