make TestAdminLogsWindow more reliable (#43710)

This commit is contained in:
Ignaz "Ian" Kraft
2026-06-04 06:08:14 +02:00
committed by GitHub
parent c588cad971
commit 5f61dda4ef
@@ -40,9 +40,9 @@ public sealed class LogWindowTest : InteractionTest
// Search for the log we added earlier.
await Client.WaitPost(() => search.Text = guid.ToString());
await ClickControl(refresh);
await RunTicks(5);
await RunTicks(10);
var searchResult = cont.Children.Where(x => x.Visible && x is AdminLogLabel).Cast<AdminLogLabel>().ToArray();
Assert.That(searchResult.Length, Is.EqualTo(1));
Assert.That(searchResult, Has.Length.EqualTo(1));
Assert.That(searchResult[0].Log.Message, Contains.Substring($" test log 1: {guid}"));
// Add a new log
@@ -52,9 +52,9 @@ public sealed class LogWindowTest : InteractionTest
// Update the search and refresh
await Client.WaitPost(() => search.Text = guid.ToString());
await ClickControl(refresh);
await RunTicks(5);
await RunTicks(10);
searchResult = cont.Children.Where(x => x.Visible && x is AdminLogLabel).Cast<AdminLogLabel>().ToArray();
Assert.That(searchResult.Length, Is.EqualTo(1));
Assert.That(searchResult, Has.Length.EqualTo(1));
Assert.That(searchResult[0].Log.Message, Contains.Substring($" test log 2: {guid}"));
}
}