Skip to content

Convert bUnit test interactions to async#90

Merged
danielchalmers merged 3 commits into
mainfrom
bunit-async
May 10, 2026
Merged

Convert bUnit test interactions to async#90
danielchalmers merged 3 commits into
mainfrom
bunit-async

Conversation

@danielchalmers

Copy link
Copy Markdown
Owner

Updates bUnit test interactions to use async dispatch APIs where they can complete normally, including ClickAsync, InputAsync, ChangeAsync, and WaitForAssertionAsync.

A few dialog-opening clicks remain synchronous with comments because those handlers await dialog or message-box results, so ClickAsync would block until the dialog closes and hang the test.

Changed ClickAsync, InputAsync, ChangeAsync, and WaitForAssertionAsync where the async API can complete normally, and updated affected tests to async Task.

I intentionally left a small set of Click() calls synchronous in DataPointViewTests.razor and ManageCategoriesTests.razor: those buttons open dialogs/message boxes whose handlers await dialog.Result, so await ClickAsync() blocks until the dialog closes and hangs the test.
@danielchalmers danielchalmers merged commit 2b073a6 into main May 10, 2026
1 check passed
@danielchalmers danielchalmers deleted the bunit-async branch May 10, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant