~aleteoryx/muditaos

ref: 0e8b4c848e3f87f3bbb1f64ef7460cf56017b87f muditaos/test/pytest/test_call_back.py -rw-r--r-- 1017 bytes
0e8b4c84 — Lefucjusz [BH-2108] Fix misaligned charging symbol 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
import time
import pytest

from harness.interface.defs import key_codes
from module_apps.call_utils import get_calllog_count, select_call_button

@pytest.mark.rt1051
@pytest.mark.usefixtures("phone_ends_test_in_desktop")
@pytest.mark.usefixtures("phone_in_desktop")
@pytest.mark.usefixtures("phone_unlocked")
def test_call(harness, call_duration):
    count_before = get_calllog_count(harness)

    # enter menu
    harness.connection.send_key_code(key_codes["enter"])
    harness.open_application("calllog")
    if harness.connection.get_application_name() != "ApplicationCallLog":
        time.sleep(2)
        assert harness.connection.get_application_name() == "ApplicationCallLog"

    # call
    select_call_button(harness, call_duration)
    count_after = get_calllog_count(harness)

    assert count_before + 1 == count_after
    time.sleep(2)  # needed to restore after call