Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ public async Task TestAdminLogsWindow()
// Search for the log we added earlier.
await Client.WaitPost(() => search.Text = guid.ToString());
await ClickControl(refresh);
await RunTicks(5);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would await Pair.RunUntilSynced() work here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is waiting for the list to fill with the given query. there is nothing to sync, so no.

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
Expand All @@ -52,9 +52,9 @@ public async Task TestAdminLogsWindow()
// 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}"));
}
}
Loading