Skip to content

Add migration tests for ContentPicker and MediaPicker configuration serializers#874

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

Add migration tests for ContentPicker and MediaPicker configuration serializers#874
KevinJump merged 3 commits intov17/picker-migrationsfrom
copilot/sub-pr-873

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

The ContentPickerConfigSerializer and MediaPickerConfigSerializer migration logic lacked test coverage, despite similar serializers having corresponding tests in uSync.Tests/Migrations.

Changes

  • ContentPickerMigrationTests.cs: 8 tests verifying filter/startNodeId migration

    • Alias → GUID conversion for content type filters
    • UDI → GUID conversion for startNodeId
    • Idempotency (pre-migrated values unchanged)
    • Multi-value and mixed scenarios
  • MediaPickerMigrationTests.cs: Parallel test suite for media picker using IMediaTypeService

Both follow existing patterns (MigrationTestBase, Moq for service mocking) and verify the GetConfigurationImport method correctly transforms v13 configuration data:

// Before migration (v13 format)
{
  "filter": "myContentType,anotherType",
  "startNodeId": "umb://document/a1b2c3d4e5f67890abcdef1234567890"
}

// After migration
{
  "filter": "guid1,guid2",
  "startNodeId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@KevinJump KevinJump marked this pull request as ready for review January 9, 2026 15:45
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~ContentPickerMigrationTests|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: /opt/hostedtoolcache/CodeQL/2.23.8/x64/codeql/csharp/tools/linux64/Semmle.Autobuild.CSharp /opt/hostedtoolcache/CodeQL/2.23.8/x64/codeql/csharp/tools/linux64/Semmle.Autobuild.CSharp (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] Update Filter and StartNodeId migration for pickers Add migration tests for ContentPicker and MediaPicker configuration serializers Jan 9, 2026
Copilot AI requested a review from KevinJump January 9, 2026 15:46
@KevinJump KevinJump merged commit 1a841ac into v17/picker-migrations Jan 9, 2026
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]>
@KevinJump KevinJump deleted the copilot/sub-pr-873 branch February 20, 2026 13:47
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