From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
Date: Sat, 30 Sep 2023 20:00:20 +0000 (+1100)
Subject: Add TestPair.WaitCommand() (#20615)
X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=5164107788e0ce22d59a203a8865edb3ad8e1890;p=space-station-14.git
Add TestPair.WaitCommand() (#20615)
---
diff --git a/Content.IntegrationTests/Pair/TestPair.Helpers.cs b/Content.IntegrationTests/Pair/TestPair.Helpers.cs
index 1478a4c7d2..510dc0b854 100644
--- a/Content.IntegrationTests/Pair/TestPair.Helpers.cs
+++ b/Content.IntegrationTests/Pair/TestPair.Helpers.cs
@@ -76,4 +76,22 @@ public sealed partial class TestPair
return otherUid.Value;
}
+
+ ///
+ /// Execute a command on the server and wait some number of ticks.
+ ///
+ public async Task WaitCommand(string cmd, int numTicks = 10)
+ {
+ await Server.ExecuteCommand(cmd);
+ await RunTicksSync(numTicks);
+ }
+
+ ///
+ /// Execute a command on the client and wait some number of ticks.
+ ///
+ public async Task WaitClientCommand(string cmd, int numTicks = 10)
+ {
+ await Client.ExecuteCommand(cmd);
+ await RunTicksSync(numTicks);
+ }
}