Skip to content

Use Assert.Fail in WebView integration test#286

Open
Redth wants to merge 2 commits into
mainfrom
redth/windows-integration-tests
Open

Use Assert.Fail in WebView integration test#286
Redth wants to merge 2 commits into
mainfrom
redth/windows-integration-tests

Conversation

@Redth
Copy link
Copy Markdown
Member

@Redth Redth commented May 20, 2026

The Windows DevFlow integration suite passes, but the local run surfaced an xUnit analyzer warning in the WebView integration test helper. This change keeps the test behavior the same while using the analyzer-preferred assertion API.

Summary

  • Replaces Assert.True(false, message) with Assert.Fail(message) in WebViewTests.
  • Leaves the timeout failure message and fallback flow unchanged.

Testing

  • DEVFLOW_TEST_PLATFORM=windows dotnet test src\DevFlow\Microsoft.Maui.DevFlow.Agent.IntegrationTests\Microsoft.Maui.DevFlow.Agent.IntegrationTests.csproj - 113/113 passed
  • Re-ran the same Windows integration suite after the fix - 113/113 passed, build succeeded with no warnings

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 20, 2026 15:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates a DevFlow Windows WebView integration test helper to use the analyzer-preferred xUnit assertion API while preserving the existing timeout/fallback behavior.

Changes:

  • Replaces Assert.True(false, message) with Assert.Fail(message) when no WebView contexts are detected within the timeout.

@github-actions
Copy link
Copy Markdown
Contributor

✅ Expert Code Review: 3 independent reviewers found no issues. Methodology: 3-model adversarial consensus.

Generated by Expert Code Review (auto) for issue #286 · ● 2.3M ·

@Redth
Copy link
Copy Markdown
Member Author

Redth commented May 20, 2026

Thanks for the review. No actionable issues were reported, so no changes are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants