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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user