Code review comment for lp:~tpeeters/ubuntu-ui-toolkit/ap-toolbar-open

Revision history for this message
Olivier Tilloy (osomon) wrote :

> Yes, it will always hide after 5 seconds.

Ok. I hadn’t understood this. I thought it would autohide only when automatically shown.
So I guess the only solution for autopilot tests is to always ensure the toolbar is first hidden by interacting with the application’s contents, then manually reveal it and interact with it (e.g. click a button).
Otherwise we’ll always run into race conditions where the toolbar auto-hides while the cursor is moving towards one of its buttons.
Either that, or your proposal of ensuring the toolbar is shown in click_button(…) before actually clicking the button.

> For most apps this is not a problem, because clicking a button takes virtually
> no time. But I realize that for the browser, the user may be entering a URL in
> the address bar for >5s. So for that case, I would have to detect when the
> user starts and stops interacting with items inside the toolbar, and stop the
> timer during interaction (and reset afterwards).

No, this is not a problem in the browser, as it uses a custom toolbar, not the default one.

« Back to merge proposal