Keyboard output in autopilot tests goes to wrong app

Bug #1255327 reported by Tim Peeters
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-keyboard
Fix Released
Critical
Tim Peeters
ubuntu-keyboard (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

If I run the ubuntuuitoolkit.tests.gallery.test_textinput when no app was started on the phone (but the screen was unlocked), all 4 tests pass. However, if I start any application (tested with notes-app and gallery-app) on the device, and then start the tests (even if the application that was opened is not active), text input tests fail as follows: https://pastebin.canonical.com/101101/

This issue was confirmed in image 29 and 32 on maguro, and 32 on mako. In all these instances, the tests above pass if no other app is open, and fail when an app was opened before the tests were executed.

After the tests finish to run, some times the app that was open before (like gallery-app) is active and has the keyboard open, even when it currently has a page (the events tab of the gallery) open that does not have keyboard input.

Tim Peeters (tpeeters)
summary: - Keyboard output in AP tests goes to wrong app
+ Keyboard output in autopilot tests goes to wrong app
Revision history for this message
Tim Peeters (tpeeters) wrote :

Some analysis:
21:40:43 < Saviq> timp, it looks to me like with the first tap on a text entry field the keyboard gets confused if it's suddenly talking to a different client
21:44:53 < Saviq> timp, so the failure seems to go like so: app with focused text field gets killed -> another app is launched and text field focused -> keyboard gets confused and unfocuses by itself
21:45:06 < Saviq> I'm confirming with manual steps now
21:46:07 < Saviq> timp, actually the fact that another app is focused in the mean time seems to be relevant (since it only happens when another app is running -> and focused when the front one is killed)

description: updated
description: updated
Revision history for this message
Michał Sawicz (saviq) wrote :

So yeah, manual steps to reproduce:
* start any app
* start another app with text entry
* focus the text entry
* kill the focused app from the console
* start any app with text entry from the console (so that the first app started is focused)
* try focusing the text entry

Expected:
* text entry focuses as usual

Current result:
* the text entry focuses for a split second and then unfocuses, the keyboard going away
* a subsequent focusing is correct

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-keyboard (Ubuntu):
status: New → Confirmed
Revision history for this message
Tim Peeters (tpeeters) wrote :

Importance set to Critical because it breaks the ubuntu-ui-toolkit autopilot tests.

Changed in ubuntu-keyboard:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Tim Peeters (tpeeters) wrote :

The package that needs to be installed on the device for phablet-test-run ubuntuuitoolkit to work is ubuntu-ui-toolkit-autopilot

Changed in ubuntu-keyboard (Ubuntu):
assignee: nobody → Thomas Moenicke (thomas-moenicke)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Still an issue?

Changed in ubuntu-keyboard:
assignee: nobody → Tim Peeters (tpeeters)
status: Confirmed → Incomplete
Changed in ubuntu-keyboard (Ubuntu):
assignee: Thomas Moenicke (thomas-moenicke) → nobody
Revision history for this message
Tim Peeters (tpeeters) wrote :

23:59:47 < Saviq> timp, can't reproduce with the steps I posted
23:59:52 < Saviq> timp, so looks like yes, fixed

also, I ran the tests mentioned in the bug description, with notes-app running in background, and they all pass (image: utopic-11)

Changed in ubuntu-keyboard:
status: Incomplete → Fix Released
Changed in ubuntu-keyboard (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.