mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-17 02:19:06 -05:00
* This PR provides a fix for the bug reported in [EGD-6081]. The solution adds the `tear_down`-like fixture called after the problematic tests, that enforce focus on `ApplicationDesktop'`s main window. * Additionally similar solution was added to `test_auto_lock` to restore original (30s) lock timeout. [EGD-6081]: https://appnroll.atlassian.net/browse/EGD-6081
20 lines
673 B
Python
20 lines
673 B
Python
# Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
import time
|
|
from harness import log
|
|
from harness.interface.defs import key_codes
|
|
|
|
def get_calllog_count(harness):
|
|
body = {"count": True}
|
|
return harness.endpoint_request("calllog", "get", body)["body"]["count"]
|
|
|
|
def select_call_button(harness, call_duration):
|
|
# call
|
|
log.info("Call duration = {}s, calling...".format(call_duration))
|
|
harness.connection.send_key_code(key_codes["fnLeft"])
|
|
time.sleep(call_duration)
|
|
# hang up
|
|
log.info("Hanging up...")
|
|
harness.connection.send_key_code(key_codes["fnRight"])
|