nixosTests.shattered-pixel-dungeon: use wait_for_text

This commit is contained in:
Weijia Wang 2023-10-28 19:59:01 +02:00 committed by Francesco Gazzetta
parent f7177e24aa
commit 1dab6eb2ea

View File

@ -21,9 +21,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
machine.wait_for_x()
machine.execute("shattered-pixel-dungeon >&2 &")
machine.wait_for_window(r"Shattered Pixel Dungeon")
machine.sleep(5)
if "Enter" not in machine.get_screen_text():
raise Exception("Program did not start successfully")
machine.wait_for_text("Enter")
machine.screenshot("screen")
'';
})