Skip to content

Add unit tests for Estate Index Page - 121 uncovered blocks#729

Merged
StuartFerguson merged 8 commits intomainfrom
copilot/improve-code-coverage-estate-index-page
Feb 4, 2026
Merged

Add unit tests for Estate Index Page - 121 uncovered blocks#729
StuartFerguson merged 8 commits intomainfrom
copilot/improve-code-coverage-estate-index-page

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 3, 2026

Estate Index Page has 121 uncovered code blocks. Added comprehensive test coverage.

Tests Added (21 total)

Interaction flows:

  • Tab navigation (Overview ↔ Operators)
  • Add operator: success, failure, exception, query failure
  • Remove operator: success, failure, exception
  • Message clearing on tab switch

Error handling paths:

  • LoadEstateData failures for each query type (Estate, Merchants, Contracts, AssignedOperators, AllOperators)
  • All paths navigate to error page as expected

Display states:

  • Merchants/contracts/operators present vs empty
  • Operator requirements rendering

Code Quality

Consolidated duplicate setup code using optional parameters:

// Before: 5 separate methods with ~70 lines of duplication
SetupSuccessfulDataLoad()
SetupSuccessfulDataLoadWithOperators(operators)
SetupSuccessfulDataLoadWithMerchants(merchants)
// ... etc

// After: Single flexible helper with named parameters
private void SetupSuccessfulDataLoad(
    List<RecentMerchantsModel>? merchants = null,
    List<RecentContractModel>? contracts = null,
    List<OperatorModel>? assignedOperators = null,
    List<OperatorDropDownModel>? operators = null)

Button selection uses FindAll with TextContent filtering for bUnit compatibility.

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 build --configuration Release (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 Estate Index Page</issue_title>
<issue_description></issue_description>

<agent_instructions>Current report shows 121 Blocks not covered</agent_instructions>

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


💡 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.

Copilot AI and others added 5 commits February 3, 2026 14:51
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve code coverage on estate index page Add unit tests for Estate Index Page - 121 uncovered blocks Feb 3, 2026
Copilot AI requested a review from StuartFerguson February 3, 2026 15:02
@StuartFerguson StuartFerguson marked this pull request as ready for review February 4, 2026 10:21
@StuartFerguson StuartFerguson merged commit 330e61b into main Feb 4, 2026
10 checks passed
@github-actions github-actions Bot deleted the copilot/improve-code-coverage-estate-index-page branch April 6, 2026 01:14
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 Estate Index Page

2 participants