How to use the umbraco-cypress-testhelpers.TemplateBuilder 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 / Settings / templates.ts View on Github external
it('Delete template', () => {
        const name = "Test template";
        cy.umbracoEnsureTemplateNameNotExists(name);

        const template = new TemplateBuilder()
            .withName(name)
            .build();

        cy.saveTemplate(template);

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

        cy.umbracoTreeItem("settings", ["Templates", name]).rightclick();
        cy.umbracoContextMenuAction("action-delete").click();

        cy.umbracoButtonByLabelKey("general_ok").click();

        cy.contains(name).should('not.exist');

        cy.umbracoEnsureTemplateNameNotExists(name);

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