tap method of Touch device doesn't have press_duration arg
Bug #1268782 reported by
Leo Arias
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Autopilot |
Fix Released
|
Undecided
|
Leo Arias | ||
autopilot (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
Currently it's not possible to do a long press on the phone, for example in order to show the popover of the text fields.
Related branches
lp://staging/~chris.gagnon/autopilot/add_press_duration_to_touch_devices
- Leo Arias (community): Disapprove
- PS Jenkins bot: Needs Fixing (continuous-integration)
- Christopher Lee (community): Needs Fixing
-
Diff: 214 lines (+133/-9)3 files modifiedautopilot/input/__init__.py (+4/-4)
autopilot/input/_uinput.py (+4/-4)
autopilot/tests/functional/test_input_stack.py (+125/-1)
lp://staging/~canonical-platform-qa/autopilot/fix1268782-press_duration
- Christopher Lee (community): Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 157 lines (+63/-13)3 files modifiedautopilot/input/__init__.py (+3/-3)
autopilot/input/_uinput.py (+4/-4)
autopilot/tests/unit/test_input.py (+56/-6)
Changed in autopilot: | |
status: | New → In Progress |
Changed in autopilot: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The fix is easy, in _uinput.Touch.tap, add an argument press_duration=0.1, and pass it to the sleep between finger_down and finger_up. Then, also pass it on Pointer.click to the Touch backend.
What's hard is the test for it. I think it wouldn't be correct to just check the value send to sleep. We need to check the amount of time elapsed between the _finger_down and _finger_up.