V16 - Introducing signs to variants (#20053)

* Adding signs to variants and adjusting HasPendingChangesSignProvider.cs

* HasPendingChangesSignProvider.cs now populates variants & refactoring to move logic to DocumentPresentationFactory.cs

* Working HasScheduleSignProvider.cs to provide variant signs

* Refactoring ISignProvider.cs to take an IEnumerable again

* Moving code from controllers to factories

* Refactoring HasPendingChangesSignProvider.cs to use the right Interface method

* Refactoring HasScheduleSignProvider.cs to be less bloated, and more readable (hopefully)

* Refactoring tests to look at variants and include a list

* Changing instantiation to be better

* Fixed minor logic issue in HasScheduleSignProvider.cs

* Refactoring to include just 1 database call.

* Adjusting tests to use the new methods.

* Reverted breaking changes
This commit is contained in:
Nicklas Kramer
2025-09-09 10:31:10 +02:00
committed by GitHub
parent 955f0c8d63
commit d51561b202
18 changed files with 386 additions and 184 deletions

View File

@@ -688,7 +688,7 @@ internal sealed class ContentServiceTests : UmbracoIntegrationTestWithContent
}
[Test]
public void Can_Get_Scheduled_Content_Keys()
public void Can_Get_Content_Schedules_By_Keys()
{
// Arrange
var root = ContentService.GetById(Textpage.Id);
@@ -699,11 +699,12 @@ internal sealed class ContentServiceTests : UmbracoIntegrationTestWithContent
ContentService.Publish(content, content.AvailableCultures.ToArray());
// Act
var keys = ContentService.GetScheduledContentKeys([Textpage.Key, Subpage.Key, Subpage2.Key]).ToList();
var keys = ContentService.GetContentSchedulesByIds([Textpage.Key, Subpage.Key, Subpage2.Key]).ToList();
// Assert
Assert.AreEqual(1, keys.Count);
Assert.AreEqual(Subpage.Key, keys.First());
Assert.AreEqual(keys[0].Key, Subpage.Id);
Assert.AreEqual(keys[0].Value.First().Id, contentSchedule.FullSchedule.First().Id);
}
[Test]