How to use the umbraco-cypress-testhelpers.ContentBuilder function in umbraco-cypress-testhelpers

To help you get started, we’ve selected a few umbraco-cypress-testhelpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github umbraco / Umbraco-CMS / src / Umbraco.Tests.AcceptanceTest / cypress / integration / Content / content.ts View on Github external
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);
            });
        });

umbraco-cypress-testhelpers

Test helpers for making Cypress tests for Umbraco solutions

MIT
Latest version published 2 years ago

Package Health Score

42 / 100
Full package analysis