Skip to content

AB#32111 use x-unit test collections#2062

Open
AndreGAot wants to merge 4 commits intodevfrom
feature/AB#32111-web-tests-use-collections
Open

AB#32111 use x-unit test collections#2062
AndreGAot wants to merge 4 commits intodevfrom
feature/AB#32111-web-tests-use-collections

Conversation

@AndreGAot
Copy link
Contributor

No description provided.

@github-actions
Copy link

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 451
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

Copy link
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

Introduces xUnit collection fixtures to share a single ASP.NET Core test host across related test classes, reducing per-test setup and removing reliance on the older GrantManagerWebTestBase inheritance pattern.

Changes:

  • Added WebTestFixture + WebTestCollection for Unity.GrantManager.Web.Tests and updated tests to consume the shared fixture.
  • Added ComponentTestFixture + ComponentTestCollection for Unity.Flex.Web.Tests and updated component tests to consume the shared fixture.
  • Updated several tests to use WebApplicationFactory clients / DI (fixture.Services) instead of base-class helpers.

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/WebTestFixture.cs Adds shared WebApplicationFactory-based fixture + collection for web tests.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Pages/Index_Tests.cs Moves to collection fixture and uses HttpClient from shared factory.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Components/SummaryWidgetTests.cs Uses shared fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Components/ProjectInfoWidgetTests.cs Uses shared fixture DI (incl. IAuthorizationService) instead of per-test logger hacks.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Components/FundingAgreementInfoWidgetTests.cs Uses shared fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Components/AttachmentControllerTests.cs Removes inheritance from web test base; remains a direct unit test.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Components/AssessmentScoresWidgetTests.cs Removes inheritance from web test base; remains a direct unit test.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Components/ApplicationTagWidgetTests.cs Removes inheritance from web test base; remains a direct unit test.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Components/ApplicationContactWidgetTests.cs Removes inheritance from web test base; removes env-var logging workaround.
applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Components/ApplicantInfoWidgetTests.cs Uses shared fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/ComponentTestFixture.cs Adds shared fixture + collection for Flex component tests.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/YesNoWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/TextDefinitionWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/TextAreaWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/TextAreaDefinitionWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/SelectListWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/SelectListDefinitionWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/RadioWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/DataGridWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/DataGridDefinitionWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/CurrencyWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/CurrencyDefinitionWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/CheckboxWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/CheckboxGroupWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.
applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Components/CheckboxGroupDefinitionWidgetTests.cs Uses component collection fixture DI to set LazyServiceProvider.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 451
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@github-actions
Copy link

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 451
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

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.

2 participants