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

Conversation

StefanBruens
Copy link
Contributor

@StefanBruens StefanBruens commented Aug 13, 2019

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
Verification run: https://openqa.opensuse.org/tests/1020089
Verification run: https://openqa.opensuse.org/tests/1020095

@StefanBruens StefanBruens force-pushed the ooffice_tip_of_the_day_2 branch 5 times, most recently from eedd5bf to 9dc3a81 Compare August 17, 2019 00:22
@StefanBruens StefanBruens changed the title [WIP][ooffice] Close "Tip of the day" dialog in desktopapps-documentation-x11 [ooffice] Close "Tip of the day" dialog in desktopapps-documentation-x11 Aug 17, 2019
@StefanBruens
Copy link
Contributor Author

@okurz - ready to go ...

@@ -127,6 +127,20 @@ 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')) {
# Sometimes the dialog appears after a short delay
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why that should be needed. assert_screen by default has a timeout of 30s meaning in line L129 we already wait for 30s anyway. If this is not enough, simply add a timeout value there?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

'test-oocalc-1' are needles with and without the tip dialog. First the program is shown, then the dialog appears - but in approximately 19/20 cases, this is the same frame.

# make sure the dialog has really closed before quiting with "ctrl-q"
wait_screen_change { send_key "alt-o" };
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?

@okurz
Copy link
Member

okurz commented Aug 20, 2019

ok, fine. Let's keep as is. You need some changes for tidy though: https://travis-ci.org/os-autoinst/os-autoinst-distri-opensuse/jobs/573003146#L446

@StefanBruens
Copy link
Contributor Author

@okurz - tidy cleanup done

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/1020089
Verification run: https://openqa.opensuse.org/tests/1020095
@okurz
Copy link
Member

okurz commented Sep 2, 2019

In any case, I think it's save to merge

@okurz okurz merged commit 77a49c5 into os-autoinst:master Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants