Fix incomplete test setup causing 4 test failures and add PR build workflow#576
Fix incomplete test setup causing 4 test failures and add PR build workflow#576StuartFerguson merged 6 commits intomainfrom
Conversation
…geTests Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
|
@copilot can you build me a pull request workflow that will build my blazor server app and run the unit tests you have just built can you use these 2 sources when restoring nuget packages --source ${{ secrets.PUBLICFEEDURL }} --source ${{ secrets.PRIVATEFEED_URL }} |
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
I've created a new GitHub Actions workflow in
The workflow uses .NET 10 and includes artifact upload for test results with 30-day retention. Commit: 9cae659 |
|
@copilot can you remove the Run Business Logic unit tests step and also if I build the solution do i need to build the Blazor UI as well ? |
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
I've updated the workflow:
The workflow now:
Commit: cc7fdcc |
Four Blazor component tests were failing due to incomplete mock setup - missing service registrations and mediator query mocks.
Changes
PermissionsDebugPageTests.cs
IPermissionService,AuthenticationStateProvider, andIPermissionStoreEstateIndexPageTests.cs
GetMerchantsQuery,GetOperatorsQuery,GetContractsQueryOnInitializedAsynccalls 4 queries; tests only mockedGetEstateQueryBoth fixes follow existing test patterns - registering mocks via
Services.AddSingleton()and setting up default return values to allow component initialization.pr-build-and-test.yml
PUBLICFEEDURLandPRIVATEFEED_URLsecretsOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.