Improve document schedule (#17535)
* Expose schedule date for on document get endpoint * typo fix * stupid stuff * Enable content scheduling features in the publishing service * Replace obsoleted non async calls * Add content scheduling test * Publush and schedule combination test * More invariantCulture notation allignment and more tests * Link up api with updated document scheduling * More invariant culture notation allignment * Fix breaking change * Return expected status codes. * Fix constructor * Forward Default implementation to actual core implementation Co-authored-by: Bjarke Berg <mail@bergmania.dk> * Forward default implementation to core implementation Co-authored-by: Bjarke Berg <mail@bergmania.dk> * Make content with scheduling retrieval scope safe --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -28,6 +28,8 @@ public class ContentEditingServiceTests : UmbracoIntegrationTestWithContent
|
||||
|
||||
private ILanguageService LanguageService => GetRequiredService<ILanguageService>();
|
||||
|
||||
private ITemplateService TemplateService => GetRequiredService<ITemplateService>();
|
||||
|
||||
[Test]
|
||||
public async Task Only_Supplied_Cultures_Are_Updated()
|
||||
{
|
||||
@@ -107,7 +109,7 @@ public class ContentEditingServiceTests : UmbracoIntegrationTestWithContent
|
||||
await LanguageService.CreateAsync(langDa, Constants.Security.SuperUserKey);
|
||||
|
||||
var template = TemplateBuilder.CreateTextPageTemplate();
|
||||
FileService.SaveTemplate(template);
|
||||
await TemplateService.CreateAsync(template, Constants.Security.SuperUserKey);
|
||||
|
||||
var contentType = new ContentTypeBuilder()
|
||||
.WithAlias("variantContent")
|
||||
@@ -127,7 +129,7 @@ public class ContentEditingServiceTests : UmbracoIntegrationTestWithContent
|
||||
.Build();
|
||||
|
||||
contentType.AllowedAsRoot = true;
|
||||
ContentTypeService.Save(contentType);
|
||||
await ContentTypeService.CreateAsync(contentType, Constants.Security.SuperUserKey);
|
||||
|
||||
return (langEn, langDa, contentType);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -328,7 +328,7 @@ public class ContentServiceTests : UmbracoIntegrationTestWithContent
|
||||
contentSchedule = ContentService.GetContentScheduleByContentId(content.Id);
|
||||
var sched = contentSchedule.FullSchedule;
|
||||
Assert.AreEqual(1, sched.Count);
|
||||
Assert.AreEqual(1, sched.Count(x => x.Culture == string.Empty));
|
||||
Assert.AreEqual(1, sched.Count(x => x.Culture == Constants.System.InvariantCulture));
|
||||
contentSchedule.Clear(ContentScheduleAction.Expire);
|
||||
ContentService.Save(content, Constants.Security.SuperUserId, contentSchedule);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user