Add button navigation tests to Contracts Index Page#732
Merged
StuartFerguson merged 4 commits intomainfrom Feb 4, 2026
Merged
Conversation
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 contracts index page
Add button navigation tests to Contracts Index Page
Feb 4, 2026
Member
|
@copilot can you check the failing tests |
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
Contributor
Author
Fixed the failing tests in commit 59fecda. The issue was that buttons wrapped in 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:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improve Code Coverage on Contracts Index Page
Summary
Successfully improved test coverage for the Contracts Index Page by adding 3 new tests for button finding and navigation, and updating existing tests to follow Estate Index Page patterns.
Issue Fixed:
The tests were failing because buttons wrapped in
RequirePermissioncomponents were not being rendered. TheAddStub<RequirePermission>()call in BaseTest creates an empty stub that doesn't render child content by default.Solution: Updated BaseTest to configure the stubs to render their ChildContent:
Test Failures Fixed:
ContractsIndex_AddNewContractButton_NavigatesToNewContractPage- Was failing with "No elements were found that matches the selector '#newContractButton'" because the button is wrapped in RequirePermissionContractsIndex_EditButton_NavigatesToEditContractPage- Was failing with "editButton should not be null but was" because the Edit button is wrapped in RequirePermissionCompleted Tasks:
Changes Summary:
Test Count: Increased from 5 to 8 tests (60% increase)
Files Modified:
ContractsIndexPageTests.cs- Added 3 new navigation tests, updated existing tests for consistencyBaseTest.cs- Fixed RequirePermission stub configuration to render child contentOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.