1 import ./make-test-python.nix ({ pkgs, ...}: let
5 meta = with pkgs.lib.maintainers; {
6 maintainers = [ zhaofengli ];
10 phone = { config, pkgs, ... }: {
16 services.xserver.desktopManager.phosh = {
28 environment.systemPackages = [
29 pkgs.phosh-mobile-settings
32 systemd.services.phosh = {
34 # Accelerated graphics fail on phoc 0.20 (wlroots 0.15)
35 "WLR_RENDERER" = "pixman";
39 virtualisation.resolution = { x = 720; y = 1440; };
40 virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci,xres=720,yres=1440" ];
50 phone.wait_for_unit("phosh.service")
52 with subtest("Check that we can see the lock screen info page"):
54 phone.succeed("timedatectl set-time '2022-01-01 07:00'")
56 phone.wait_for_text("Saturday")
57 phone.screenshot("01lockinfo")
59 with subtest("Check that we can unlock the screen"):
60 phone.send_chars("${pin}", delay=0.2)
62 phone.screenshot("02unlock")
64 phone.send_chars("\n")
66 phone.wait_for_text("All Apps")
67 phone.screenshot("03launcher")
69 with subtest("Check the on-screen keyboard shows"):
70 phone.send_chars("mobile setting", delay=0.2)
71 phone.wait_for_text("123") # A button on the OSK
72 phone.screenshot("04osk")
74 with subtest("Check mobile-phosh-settings starts"):
75 phone.send_chars("\n")
76 phone.wait_for_text("Tweak advanced mobile settings");
77 phone.screenshot("05settings")