Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ protected IActionResult ContentCollectionOperationStatusResult(ContentCollection
.WithTitle("Data type id does not belong to a collection")
.WithDetail("The specified data type does not represent a collection")
.Build()),
ContentCollectionOperationStatus.DataTypeNotContentCollection => new BadRequestObjectResult(problemDetailsBuilder
.WithTitle("Data type id does not represent the configured collection")
.WithDetail($"The specified data type is not the configured collection for the given {type} item")
.Build()),
ContentCollectionOperationStatus.DataTypeNotContentProperty => new BadRequestObjectResult(problemDetailsBuilder
.WithTitle($"Data type id is not a {type} property")
.WithDetail($"The specified data type is not part of the {type} properties")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protected IActionResult ContentEditingOperationStatusResult(ContentEditingOperat
.WithDetail("A notification handler prevented the content operation.")
.Build()),
ContentEditingOperationStatus.ContentTypeNotFound => NotFound(problemDetailsBuilder
.WithTitle("The requested content could not be found")
.WithTitle("The requested content type could not be found")
.Build()),
ContentEditingOperationStatus.ContentTypeCultureVarianceMismatch => BadRequest(problemDetailsBuilder
.WithTitle("Content type culture variance mismatch")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public enum ContentCollectionOperationStatus
ContentNotFound,
ContentTypeNotFound,
DataTypeNotCollection,
DataTypeNotContentCollection,
DataTypeNotContentProperty,
DataTypeNotFound,
DataTypeWithoutContentType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Umbraco.Cms.Core.Persistence.Querying;
using Umbraco.Cms.Core.Security.Authorization;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.AuthorizationStatus;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Infrastructure.Persistence;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Umbraco.Cms.Core.Persistence.Querying;
using Umbraco.Cms.Core.Security.Authorization;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Services.AuthorizationStatus;
using Umbraco.Cms.Core.Services.OperationStatus;
using Umbraco.Cms.Infrastructure.Persistence;

Expand Down
9 changes: 8 additions & 1 deletion tests/Umbraco.Tests.Common/Builders/DataEditorBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class DataEditorBuilder<TParent>
private string _alias;
private IDictionary<string, object> _defaultConfiguration;
private string _name;
private ConfigurationEditor? _configurationEditor;

public DataEditorBuilder(TParent parentBuilder)
: base(parentBuilder)
Expand All @@ -46,6 +47,12 @@ public DataEditorBuilder<TParent> WithDefaultConfiguration(IDictionary<string, o
return this;
}

public DataEditorBuilder<TParent> WithConfigurationEditor(ConfigurationEditor configurationEditor)
{
_configurationEditor = configurationEditor;
return this;
}

public ConfigurationEditorBuilder<DataEditorBuilder<TParent>> AddExplicitConfigurationEditorBuilder() =>
_explicitConfigurationEditorBuilder;

Expand All @@ -58,7 +65,7 @@ public override IDataEditor Build()
var alias = _alias ?? name.ToCamelCase();

var defaultConfiguration = _defaultConfiguration ?? new Dictionary<string, object>();
var explicitConfigurationEditor = _explicitConfigurationEditorBuilder.Build();
var explicitConfigurationEditor = _configurationEditor ?? _explicitConfigurationEditorBuilder.Build();
var explicitValueEditor = _explicitValueEditorBuilder.Build();

return new DataEditor(
Expand Down
Loading