Need OSK input device on phones

Bug #1428114 reported by Cris Dywan
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Fix Released
High
Richard Huddie

Bug Description

Currently although it may look as though we have an OSK in Autopilot tests running on phones, keyboard input emits synthetic events. This makes testing of particular behavior involving pre-edit text impossible to test (see also bug 1428206). We don't have unit tests for this either because maliit is very hard to spawn, so we essentially never run any of the tests for it.

def get_keyboard():
    """Return the keyboard device."""
    # TODO return the OSK if we are on the phone. --elopio - 2014-01-13
    return input.Keyboard.create()

As per my understanding we should have an input device that talks to maliit using introspection (accessibility?), which is the way tests run in ubuntu-keyboard, but those aren't right now re-usable by other projects.

Related branches

Revision history for this message
Zsombor Egri (zsombi) wrote :

I think we should extend these to be used also on unit tests. We do not run those as we do not have OSK on desktop environments. I think it would be worth having those there as well.

Revision history for this message
Leo Arias (elopio) wrote :

I agree with zombie that unit tests are needed. Ideally, you would find a nice way to fake the OSK and trigger the events it is supposed to trigger.

About the autopilot tests, I think we have everything we need now. We need to extend get_keyboard with:

if model == touch:
    if maliit is not running with testability:
       restart malit with testability
    return ubuntu_keyboard.emulators.keyboard.Keyboard()
else:
    return input.Keyboard.create()

Revision history for this message
Cris Dywan (kalikiana) wrote :

I filed bug 1428206 for implementing a fake OSK plugin, which may eventually also serve as a drop-in replacement for Autopilot to avoid requiring maliit.

description: updated
Cris Dywan (kalikiana)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Richard Huddie (rhuddie)
status: Confirmed → Fix Committed
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: Fix Committed → 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.