Skip to content

Add test coverage for MediaPickerConfigSerializer v13 migration logic#875

Merged
KevinJump merged 2 commits intov17/picker-migrationsfrom
copilot/sub-pr-873-again
Jan 9, 2026
Merged

Add test coverage for MediaPickerConfigSerializer v13 migration logic#875
KevinJump merged 2 commits intov17/picker-migrationsfrom
copilot/sub-pr-873-again

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

Addresses feedback on #873 requesting test coverage for the MediaPickerConfigSerializer migration logic that converts v13 configuration formats to v14.

Changes

  • Added MediaPickerMigrationTests.cs following existing migration test patterns
    • Filter migration: aliases → GUIDs ("Image,Video""cc07b313-...,f6c515bb-...")
    • StartNodeId migration: UDI → GUID ("umb://media/71332aa7...""71332aa7-8bea-...")
    • Idempotency verification (already-migrated GUIDs unchanged)
    • Combined migration scenarios
    • Edge cases: null filters, unknown aliases

Uses Moq to stub IMediaTypeService with test media types, consistent with ListMigrationTests and RichTextMigrationTests patterns.

// Test verifies this transformation:
{
  "filter": "Image,Video",
  "startNodeId": "umb://media/71332aa78bea44f19aa600de961b66e8"
}
// becomes:
{
  "filter": "cc07b313-0843-4aa8-bbda-871c8da728c8,f6c515bb-653c-4bdc-821c-987729ebe327",
  "startNodeId": "71332aa7-8bea-44f1-9aa6-00de961b66e8"
}

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

Copy link
Contributor Author

Copilot AI commented Jan 9, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

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:

  • www.myget.org
    • Triggering command: /usr/bin/dotnet dotnet test uSync.Tests/uSync.Tests.csproj --filter FullyQualifiedName~MediaPickerMigrationTests --logger console;verbosity=detailed (dns block)
    • Triggering command: /usr/bin/dotnet dotnet build uSync.Tests/uSync.Tests.csproj --no-restore (dns block)
    • Triggering command: /usr/bin/dotnet dotnet build --configuration Release --no-restore (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] WIP address feedback on filter and startnodeid migration Add test coverage for MediaPickerConfigSerializer v13 migration logic Jan 9, 2026
Copilot AI requested a review from KevinJump January 9, 2026 15:41
@KevinJump KevinJump marked this pull request as ready for review January 9, 2026 15:44
@KevinJump KevinJump merged commit 95c2c1b into v17/picker-migrations Jan 9, 2026
@KevinJump KevinJump deleted the copilot/sub-pr-873-again branch January 9, 2026 15:46
KevinJump added a commit that referenced this pull request Jan 12, 2026
#873)

* Fix: #870 - Migrate Filter and StartNodeId values for pickers from v13

* Update uSync.Core/DataTypes/PickerConfigurationSerializerBase.cs

Co-authored-by: Copilot <[email protected]>

* Update uSync.Core/DataTypes/PickerConfigurationSerializerBase.cs

Co-authored-by: Copilot <[email protected]>

* Update uSync.Core/Mapping/Mappers/MediaPicker3Mapper.cs

Co-authored-by: Copilot <[email protected]>

* Update uSync.Core/DataTypes/PickerConfigurationSerializerBase.cs

Co-authored-by: Copilot <[email protected]>

* revert mapper service injection (not required)

* Add test coverage for MediaPickerConfigSerializer v13 migration logic (#875)

* Initial plan

* Add MediaPickerMigrationTests to cover Filter and StartNodeId migrations

Co-authored-by: KevinJump <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: KevinJump <[email protected]>

* Add migration tests for ContentPicker and MediaPicker configuration serializers (#874)

* Initial plan

* Add comprehensive migration tests for ContentPicker and MediaPicker configurations

Co-authored-by: KevinJump <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: KevinJump <[email protected]>
Co-authored-by: Kevin Jump <[email protected]>

* fixup richtext tst

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: KevinJump <[email protected]>
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.

2 participants