about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2016-08-15 18:12:54 +0200
committeraszlig <aszlig@redmoonstudios.org>2016-08-15 18:12:54 +0200
commit0a3e79246765dde328b509b599c3091a54980e6c (patch)
treeb7fea376b8c8577753884920f728759f5a0d772a /tests
parentda20159356b465c647b8d3ce2a2342e2cea290b0 (diff)
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 <aszlig@redmoonstudios.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/games/starbound.nix37
1 files changed, 10 insertions, 27 deletions
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");
   '';
 }