Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cy.saveContent(rootContentNode).then((contentNode) => {
// Add an item under root node
const childContentNode = new ContentBuilder()
.withContentTypeAlias(createdChildDocType["alias"])
.withAction("saveNew")
.withParent(contentNode["id"])
.addVariant()
.withName(childNodeName)
.withSave(true)
.done()
.build();
cy.saveContent(childContentNode);
});
const anotherRootContentNode = new ContentBuilder()
.withContentTypeAlias(rootDocTypeAlias)
.withAction("saveNew")
.addVariant()
.withName(anotherNodeName)
.withSave(true)
.done()
.build();
cy.saveContent(anotherRootContentNode);
});
});