diff --git a/nixos/tests/lomiri-calendar-app.nix b/nixos/tests/lomiri-calendar-app.nix index 2d8a7ae10026..5b18e7dd50b4 100644 --- a/nixos/tests/lomiri-calendar-app.nix +++ b/nixos/tests/lomiri-calendar-app.nix @@ -63,19 +63,28 @@ # On New Event page machine.succeed("xdotool mousemove 500 230 click 1") machine.sleep(2) - machine.send_chars("foobar") + machine.send_chars("Poke") machine.sleep(2) # make sure they're actually in there machine.succeed("xdotool mousemove 1000 40 click 1") + machine.sleep(10) # Give the app some time to save the event + + # Can't consistently OCR for "Agenda". Just restart it. + machine.succeed("pgrep -afx lomiri-calendar-app >&2") + machine.succeed("pkill -efx lomiri-calendar-app >&2") + machine.wait_until_fails("pgrep -afx lomiri-calendar-app >&2") + machine.succeed("lomiri-calendar-app >&2 &") + machine.sleep(10) + machine.send_key("alt-f10") machine.sleep(2) - machine.wait_for_text("Agenda") - machine.screenshot("lomiri-calendar_eventadded") # Back on main page # Event was created, does it have the correct name? - machine.wait_for_text("foobar") + machine.wait_for_text("Poke") machine.screenshot("lomiri-calendar_works") - machine.succeed("pkill -f lomiri-calendar-app") + machine.succeed("pgrep -afx lomiri-calendar-app >&2") + machine.succeed("pkill -efx lomiri-calendar-app >&2") + machine.wait_until_fails("pgrep -afx lomiri-calendar-app >&2") with subtest("lomiri calendar localisation works"): machine.succeed("env LANG=de_DE.UTF-8 lomiri-calendar-app >&2 &")