From 0a3e79246765dde328b509b599c3091a54980e6c Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 15 Aug 2016 18:12:54 +0200 Subject: tests: Fix and improve Starbound test Since version 1.0, the coordinates for the menu labels no longer apply and need to be fixed. Also we no longer land on our ship but in the protectorate building, so there won't be a quest dialog to close. This also simplifies the test because we can now detect whether we're in-game using OCR matching parts of the quest marker for "Attend your graduation ceremony". I've also increased the available memory for the server, because it seems that for this simple test the base memory required for running a Starbound server seems to have increased. Signed-off-by: aszlig --- tests/games/starbound.nix | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'tests') diff --git a/tests/games/starbound.nix b/tests/games/starbound.nix index 9f98416f..4014260e 100644 --- a/tests/games/starbound.nix +++ b/tests/games/starbound.nix @@ -47,7 +47,7 @@ in { dataDir = "/var/lib/starbound-test"; users.alice.password = "secret"; }; - virtualisation.memorySize = 1024; + virtualisation.memorySize = 2047; networking.interfaces.eth1.ipAddress = "192.168.0.1"; networking.interfaces.eth1.prefixLength = 24; networking.firewall.enable = false; @@ -76,44 +76,27 @@ in { $client->waitForText(qr/options/i); }); - ${clickAt "multiplayer" 100 460} + ${clickAt "join-game" 100 560} $client->waitForText(qr/select/i); - ${clickAt "new-character" 460 170} + ${clickAt "new-character" 460 220} $client->waitForText(qr/species/i); - ${clickAt "create-character" 600 525} + ${clickAt "create-character" 600 625} $client->waitForText(qr/select/i); - ${clickAt "use-character" 460 170} + ${clickAt "use-character" 460 220} $client->waitForText(qr/ser[vu]er/i); - ${clickAt "server-address" 460 272} + ${clickAt "server-address" 460 322} ${typeText "server-address" "192.168.0.1"} - ${clickAt "server-account" 490 304} + ${clickAt "server-account" 490 354} ${typeText "server-account" "alice"} - ${clickAt "server-password" 490 336} + ${clickAt "server-password" 490 386} ${typeText "server-password" "secret"} - ${clickAt "join-server" 495 370} - - $client->waitForText(qr/q[uv]est/i); - ${xdo { - name = "close-quest-dialog"; - description = "closing the quest dialog window"; - xdoScript = '' - key Escape - ''; - }} - ${xdo { - name = "move-right"; - description = "moving to the right of the ship"; - xdoScript = '' - keydown d - sleep 10 - keyup d - ''; - }} + ${clickAt "join-server" 495 420} + $client->waitForText(qr/graduation/i); $client->screenshot("client"); ''; } -- cgit 1.4.1