feat: add control center, multiple relay nodes and P2P-first transport
This commit is contained in:
1 parent
0988e9c363
commit
2abfb63da9
44 files changed
+3477
-67
No files matched your search
@@ -62,6 +62,7 @@ internal static class Program
|
||||
{
|
||||
Require(window.FindControl<TextBox>("ServerBox")?.Text == RelayOptions.DefaultServer, "Server binding is wrong");
|
||||
Require(window.FindControl<TextBox>("OriginBox")?.Text == RelayOptions.DefaultOrigin, "Origin binding is wrong");
|
||||
Require(window.FindControl<CheckBox>("RelayOnlyCheck")?.IsChecked == vm.RelayOnly, "Transport preference binding is wrong");
|
||||
if (!live)
|
||||
{
|
||||
Require(window.FindControl<Button>("ConnectButton")?.IsEffectivelyEnabled == false, "Connect should be disabled before device selection");
|
||||
@@ -97,10 +98,14 @@ internal static class Program
|
||||
}
|
||||
await vm.InitializeAsync();
|
||||
await UntilAsync(() => vm.RelayOnline && vm.Devices.Any(d => d.Id == "home-phone"), "Public gateway was not discovered: " + vm.Notice);
|
||||
Require(vm.RelayNodes.Count == 2 && vm.RelayNodes.All(n => n.Healthy), "Both relay nodes should be healthy");
|
||||
vm.SelectedDevice = vm.Devices.Single(d => d.Id == "home-phone");
|
||||
Require(!vm.SelectedDevice.Busy, "The gateway is in use; smoke test will not steal its lease");
|
||||
await vm.ConnectCommand.ExecuteAsync(null);
|
||||
await UntilAsync(() => vm.Ready && vm.Model != "—", "Device did not become ready: " + vm.Notice);
|
||||
await UntilAsync(() => vm.TransportStatus.Contains("P2P") || vm.TransportStatus.Contains("中继连接"), "Transport status was not updated");
|
||||
Require(window.FindControl<TextBlock>("TransportStatusText")?.Text == vm.TransportStatus, "Actual route binding failed");
|
||||
Console.WriteLine("PASS: two healthy nodes and actual transport shown: " + vm.TransportStatus);
|
||||
Require(window.FindControl<TextBlock>("ModelText")?.Text == vm.Model, "Model UI binding failed");
|
||||
Require(window.FindControl<Button>("ReconnectButton")?.IsEffectivelyEnabled == true, "Reconnect button not enabled");
|
||||
Console.WriteLine("PASS: public device list, GUI connect, local ADB ready and model information: " + vm.Model);
|
||||
|
||||
Reference in new issue
Block a user