Skip to content

Add test coverage for Merchants Deposit page#758

Merged
StuartFerguson merged 3 commits intomainfrom
copilot/improve-code-coverage-deposit-page
Feb 7, 2026
Merged

Add test coverage for Merchants Deposit page#758
StuartFerguson merged 3 commits intomainfrom
copilot/improve-code-coverage-deposit-page

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 7, 2026

Missing test coverage for the Merchants Deposit page (/merchants/{MerchantId:guid}/deposit).

Changes

Created MerchantsDepositPageTests.cs with 8 tests covering:

  • Page rendering: Title, merchant name display, form field presence
  • Form submission: Success path with navigation to /merchants, failure path with error message
  • Button interactions: Cancel button navigation, deposit button with form validation
  • Error handling: Navigation to error page on merchant load failure

Implementation

Followed Estate Index Page test patterns:

// Find buttons by text content
var buttons = cut.FindAll("button");
var makeDepositButton = buttons.FirstOrDefault(b => 
    b.TextContent.Contains("Make Deposit") && 
    (b.GetAttribute("id") ?? "") == "makeDepositButton");

// Verify navigation
_fakeNavigationManager.Uri.ShouldContain("/merchants");

// Use SetDelayOverride for faster execution
cut.Instance.SetDelayOverride(0);

Uses Bunit, Moq, Shouldly, and BaseTest infrastructure consistent with existing test suite.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • f.feedz.io
    • Triggering command: /usr/bin/dotnet dotnet test EstateManagementUI.BlazorServer.Tests/EstateManagementUI.BlazorServer.Tests.csproj --filter FullyQualifiedName~MerchantsDepositPageTests --logger console;verbosity=detailed (dns block)
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.24.0/x64/codeql/csharp/tools/linux64/Semmle.Autobuild.CSharp /opt/hostedtoolcache/CodeQL/2.24.0/x64/codeql/csharp/tools/linux64/Semmle.Autobuild.CSharp (dns block)
    • Triggering command: /usr/bin/dotnet dotnet restore --no-dependencies /home/REDACTED/work/EstateManagementUI/EstateManagementUI/EstateManagementUI.sln --packages /home/REDACTED/work/EstateManagementUI/.codeql-scratch/dbs/csharp/working/packages /p:DisableImplicitNuGetFallbackFolder=true --verbosity normal /p:TargetFrameworkRootPath=/home/REDACTED/work/EstateManagementUI/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot /p:NetCoreTargetingPackRoot=/home/REDACTED/work/EstateManagementUI/.codeql-scratch/dbs/csharp/working/emptyFakeDotnetRoot /p:AllowMissingPrunePackageData=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Improve Code Coverage on Merchants Deposit Page</issue_title>
<issue_description>Use the estate index page tests as a guide on how to find buttons and also verify navigation</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Improve code coverage on merchants deposit page Add test coverage for Merchants Deposit page Feb 7, 2026
Copilot AI requested a review from StuartFerguson February 7, 2026 12:16
@StuartFerguson StuartFerguson marked this pull request as ready for review February 7, 2026 12:19
@StuartFerguson StuartFerguson merged commit cd15d94 into main Feb 7, 2026
10 checks passed
@github-actions github-actions Bot deleted the copilot/improve-code-coverage-deposit-page branch April 9, 2026 01:03
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.

Improve Code Coverage on Merchants Deposit Page

2 participants