Skip to content

Improve test coverage for Merchants View Page#754

Merged
StuartFerguson merged 2 commits intomainfrom
copilot/improve-code-coverage-merchants-view
Feb 7, 2026
Merged

Improve test coverage for Merchants View Page#754
StuartFerguson merged 2 commits intomainfrom
copilot/improve-code-coverage-merchants-view

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 7, 2026

Expands MerchantsViewPageTests from 4 to 21 tests following patterns established in EstateIndexPageTests.

Changes

  • Tab navigation (6 tests): Verify switching between all 8 tabs (details, address, contact, operators, contracts, devices, transactions, settlements)
  • Data display (6 tests): Test operators, contracts, and devices with data present and empty states
  • Detailed views (3 tests): Validate merchant details, address, and contact information rendering
  • Error handling (2 tests): Navigation on load failure and back button behavior

Test Pattern

Uses button finding and navigation verification as demonstrated in Estate Index tests:

// Find button by text content
IRefreshableElementCollection<IElement> buttons = cut.FindAll("button");
IElement? operatorsButton = buttons.FirstOrDefault(b => b.TextContent.Contains("Assigned Operators"));
operatorsButton?.Click();

// Verify navigation
cut.WaitForAssertion(() => cut.Markup.ShouldContain("No operators assigned"), timeout: TimeSpan.FromSeconds(5));

Helper methods added for test data setup to reduce duplication across tests.

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~MerchantsViewPageTests --verbosity normal (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 View 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.

Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve code coverage on merchants view page Improve test coverage for Merchants View Page Feb 7, 2026
Copilot AI requested a review from StuartFerguson February 7, 2026 07:42
@StuartFerguson StuartFerguson marked this pull request as ready for review February 7, 2026 07:43
@StuartFerguson StuartFerguson merged commit 699c839 into main Feb 7, 2026
10 checks passed
@github-actions github-actions Bot deleted the copilot/improve-code-coverage-merchants-view 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 View Page

2 participants