1.0.0 • Published 4 years ago

cypress-plone v1.0.0

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
4 years ago

cypress-plone

Cypress plugin for the Plone CMS.

Install with npm

npm install -D cypress-plone

Install with Yarn

yarn add cypress-plone --dev

Then include in your project's cypress/support/index.js

require("cypress-plone");

Use

After installation your cy object will have a ploneLoginAsUser and a ploneLoginAsRole command.

describe("Show how to activate the add-on", () => {
  beforeEach(() => {
    cy.ploneLoginAsRole("Manager");
  });

  it("can be installed", () => {
    cy.visit("/prefs_install_products_form");
    //...
  });
});
describe("Show how to activate the add-on", () => {
  beforeEach(() => {
    cy.ploneLoginAsUser("admin", "topsecret");
  });

  it("can be installed", () => {
    cy.visit("/prefs_install_products_form");
    //...
  });
});

You can customize the username and password combinations in your cypress config:

{
  "baseUrl": "http://localhost:8080/Plone",
  "env": {
    "SITE_OWNER_NAME": "admin",
    "SITE_OWNER_PASSWORD": "admin"
  }
}

License

This project is licensed under the terms of the MIT license.