Skip to content

Create testing framework for Add-in Project - #45

Merged
stdavis merged 13 commits into
mainfrom
fix/update-dfc-fix
Sep 3, 2026
Merged

Create testing framework for Add-in Project#45
stdavis merged 13 commits into
mainfrom
fix/update-dfc-fix

Conversation

@stdavis

@stdavis stdavis commented Sep 1, 2026

Copy link
Copy Markdown
Member

We can't test everything since we don't have access to the ArcGIS Pro SDK in GitHub Actions. But we were able to pull out some logic into a separate .NET project and write tests for that.

Closes #37

@stdavis
stdavis enabled auto-merge (rebase) September 1, 2026 23:25
@stdavis
stdavis requested a lite review from Copilot September 1, 2026 23:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are a few correctness/UX issues (solution build mapping, UI label typo, and multi-select “Add New” eligibility vs change status) that should be addressed before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR establishes a dependency-free “review rules” core (plus xUnit tests) so deterministic UTRANS change-review behavior can be validated in GitHub Actions without requiring the ArcGIS Pro SDK, and updates the ArcGIS Pro add-in to consume that core where appropriate.

Changes:

  • Added UGRC.UtransTools.Core (net8.0) and UGRC.UtransTools.Core.Tests with initial rule/payload/save-plan coverage.
  • Refactored add-in save/new-road logic and editor state to use core rule helpers, including updated Change Status UX.
  • Updated CI to run CSharpier across the add-in folder and execute core tests with coverage on Ubuntu.
File summaries
File Description
UGRC.UtransTools.sln Adds core + test projects and new solution configurations.
docs/agents/triage-labels.md Documents label mapping for agent triage roles.
docs/agents/issue-tracker.md Documents GitHub issue-tracker conventions for agents.
docs/agents/domain.md Documents how agents should consume repo domain docs.
CONTEXT.md Introduces canonical domain vocabulary for UTRANS change review.
AGENTS.md Adds entrypoint pointers for agent documentation.
add-in/UGRC.UtransTools/UtransEditorDockpaneViewModel.cs Updates editor state/commands to support Change Status edits and saving without a linked road, and to gate “repair” UX.
add-in/UGRC.UtransTools/UtransEditorDockpaneView.xaml Wires XAML to new view-model properties (Change Status, Save visibility, repair enablement).
add-in/UGRC.UtransTools/UGRC.UtransTools.csproj References the new Core project from the add-in.
add-in/UGRC.UtransTools/Services/UtransEditService.cs Uses core ReviewRules for eligibility, payload building, and save planning.
add-in/UGRC.UtransTools/Services/DfcSelectionService.cs Adds selection helper for “exactly one UTRANS road selected”.
add-in/UGRC.UtransTools/Models/EditorReviewState.cs Renames and implements ChangeStatus, and moves edited-value normalization into core rules.
add-in/UGRC.UtransTools/Models/DfcSelectionSnapshot.cs Uses core DfcResultReview to identify unlinked new records.
add-in/UGRC.UtransTools/Models/DfcDisposition.cs Removes the old enum in favor of Change Status handling.
add-in/UGRC.UtransTools/Configuration/UtransEditorConfiguration.cs Renames the “disposition” field constant to “change status”.
add-in/UGRC.UtransTools/Config.daml Bumps add-in version metadata.
add-in/UGRC.UtransTools.Core/UGRC.UtransTools.Core.csproj New dependency-free core library project (net8.0).
add-in/UGRC.UtransTools.Core/ReviewRules.cs Implements core deterministic rules: address-range validation, normalization, payload building, and save planning.
add-in/UGRC.UtransTools.Core.Tests/UGRC.UtransTools.Core.Tests.csproj New xUnit test project with coverlet collector.
add-in/UGRC.UtransTools.Core.Tests/ReviewRulesTests.cs Adds unit tests covering rule behaviors and payload/save-plan outcomes.
add-in/README.md Updates usage docs for Change Status and Save vs Add New behavior.
.vscode/settings.json Updates approved command patterns for tooling/tasks.
.github/workflows/pull_request.add_in.yml Expands formatting scope and adds Ubuntu test job for core with coverage.
Review details
  • Files reviewed: 23/23 changed files
  • Comments generated: 3
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread UGRC.UtransTools.sln Outdated
Comment thread add-in/UGRC.UtransTools/UtransEditorDockpaneViewModel.cs
Comment thread add-in/UGRC.UtransTools/UtransEditorDockpaneView.xaml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are a couple of correctness/maintainability issues in newly introduced/modified logic that should be addressed before merging (see PR comments).

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 24/24 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread UGRC.UtransTools.sln Outdated
Comment thread add-in/UGRC.UtransTools.Core/ReviewRules.cs Outdated
@stdavis
stdavis requested a review from acneville September 2, 2026 20:16
@stdavis
stdavis enabled auto-merge (rebase) September 2, 2026 20:17

@acneville acneville left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great other than (potentially!) the casing. Once that's figured out, I'll approve.

Comment thread add-in/UGRC.UtransTools.Core.Tests/ReviewRulesTests.cs Outdated
Co-authored-by: stdavis <1326248+stdavis@users.noreply.github.com>
auto-merge was automatically disabled September 3, 2026 16:22

Head branch was pushed to by a user without write access

@stdavis
stdavis enabled auto-merge (rebase) September 3, 2026 16:43
@stdavis
stdavis merged commit b010ad8 into main Sep 3, 2026
4 checks passed
@stdavis
stdavis deleted the fix/update-dfc-fix branch September 3, 2026 16:43
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.

test(add-in): establish a GitHub Actions unit-testing foundation

4 participants