Fixes failing front-end unit test to align with new behaviour from PR #17818 (

Allow skipSelect blueprints only when one blueprint exists).
This commit is contained in:
Andy Butland
2025-01-21 09:19:31 +01:00
parent 25628a8b76
commit 6bd11bf233

View File

@@ -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");