From 6bd11bf233fc8d792bb9886f4e4ca7dca8ffb30f Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Tue, 21 Jan 2025 09:19:31 +0100 Subject: [PATCH] Fixes failing front-end unit test to align with new behaviour from PR #17818 ( Allow skipSelect blueprints only when one blueprint exists). --- .../unit/app/content/create-content-controller.spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/test/unit/app/content/create-content-controller.spec.js b/src/Umbraco.Web.UI.Client/test/unit/app/content/create-content-controller.spec.js index 5954a2f984..86495b59ea 100644 --- a/src/Umbraco.Web.UI.Client/test/unit/app/content/create-content-controller.spec.js +++ b/src/Umbraco.Web.UI.Client/test/unit/app/content/create-content-controller.spec.js @@ -1,4 +1,4 @@ -(function () { +(function () { describe("create content dialog", function () { @@ -89,13 +89,16 @@ expect(searcher.search).toHaveBeenCalledWith("blueprintId", "1"); }); - it("skips selection and creates first blueprint when configured to", + it("skips selection and creates first blueprint when configured to and only one blueprint exists", function () { initialize({ allowBlank: true, skipSelect: true }); + // Ensure only one blueprint is available. + allowedTypes[1].blueprints = { "1": "a" }; + scope.createOrSelectBlueprintIfAny(allowedTypes[1]); expect(location.path).toHaveBeenCalledWith("/content/content/edit/1234");