Skip to content

Add comprehensive test coverage for Operators View page#751

Merged
StuartFerguson merged 2 commits intomainfrom
copilot/improve-code-coverage-operators-page-again
Feb 6, 2026
Merged

Add comprehensive test coverage for Operators View page#751
StuartFerguson merged 2 commits intomainfrom
copilot/improve-code-coverage-operators-page-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 6, 2026

Operators View page had minimal test coverage (3 tests). Added 8 tests following patterns from EstateIndexPageTests to cover button navigation, field display states, and error handling.

New Test Coverage

Navigation

  • Back to List button click → /operators navigation
  • Back to List button from "not found" state → /operators navigation

Field Display States

  • RequireCustomMerchantNumber: Required/Not Required badge rendering
  • RequireCustomTerminalNumber: Required/Not Required badge rendering

Error Handling

  • LoadOperator failure → error page navigation
  • Null operator model → "Operator not found" display

Pattern Matching

Uses same approach as EstateIndexPageTests:

// Button finding
IRefreshableElementCollection<IElement> buttons = cut.FindAll("button");
IElement? backButton = buttons.FirstOrDefault(b => b.TextContent.Contains("Back to List"));
backButton?.Click();

// Navigation verification
_fakeNavigationManager.Uri.ShouldContain("/operators");

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~OperatorsViewPageTests --logger console;verbosity=detailed (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 Operators 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)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Improve code coverage on operators view page Add comprehensive test coverage for Operators View page Feb 6, 2026
Copilot AI requested a review from StuartFerguson February 6, 2026 19:03
@StuartFerguson StuartFerguson marked this pull request as ready for review February 6, 2026 21:24
@StuartFerguson StuartFerguson merged commit c3ca4d0 into main Feb 6, 2026
10 checks passed
@github-actions github-actions Bot deleted the copilot/improve-code-coverage-operators-page-again branch April 8, 2026 01:13
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 Operators View Page

2 participants