Skip to content

Commit 6bd11bf

Browse files
committed
Fixes failing front-end unit test to align with new behaviour from PR #17818 (
Allow skipSelect blueprints only when one blueprint exists).
1 parent 25628a8 commit 6bd11bf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Umbraco.Web.UI.Client/test/unit/app/content/create-content-controller.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function () {
1+
(function () {
22

33
describe("create content dialog",
44
function () {
@@ -89,13 +89,16 @@
8989
expect(searcher.search).toHaveBeenCalledWith("blueprintId", "1");
9090
});
9191

92-
it("skips selection and creates first blueprint when configured to",
92+
it("skips selection and creates first blueprint when configured to and only one blueprint exists",
9393
function () {
9494
initialize({
9595
allowBlank: true,
9696
skipSelect: true
9797
});
9898

99+
// Ensure only one blueprint is available.
100+
allowedTypes[1].blueprints = { "1": "a" };
101+
99102
scope.createOrSelectBlueprintIfAny(allowedTypes[1]);
100103

101104
expect(location.path).toHaveBeenCalledWith("/content/content/edit/1234");

0 commit comments

Comments
 (0)