How to use the umbraco-cypress-testhelpers.DocumentTypeBuilder 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
it('Rollback content', () => {
        const rootDocTypeName = "Test document type";
        const initialNodeName = "Home node";
        const nodeName = "Home";

        const rootDocType = new DocumentTypeBuilder()
            .withName(rootDocTypeName)
            .withAllowAsRoot(true)
            .build();

        cy.deleteAllContent();
        cy.umbracoEnsureDocumentTypeNameNotExists(rootDocTypeName);

        cy.saveDocumentType(rootDocType).then((generatedRootDocType) => {
            const rootContentNode = new ContentBuilder()
                .withContentTypeAlias(generatedRootDocType["alias"])
                .addVariant()
                .withName(initialNodeName)
                .withSave(true)
                .done()
                .build();
github umbraco / Umbraco-CMS / src / Umbraco.Tests.AcceptanceTest / cypress / integration / Settings / documentTypes.ts View on Github external
it('Delete document type', () => {
    const name = "Test document type";
    cy.umbracoEnsureDocumentTypeNameNotExists(name);

    const dataType = new DocumentTypeBuilder()
      .withName(name)
      .build();

    cy.saveDocumentType(dataType);


    cy.umbracoSection('settings');
    cy.get('li .umb-tree-root:contains("Settings")').should("be.visible");

    cy.umbracoTreeItem("settings", ["Document Types", name]).rightclick();

    cy.umbracoContextMenuAction("action-delete").click();

    cy.get('label.checkbox').click();
    cy.umbracoButtonByLabelKey("general_ok").click();

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