Files
raven-client/ayanova/tests/e2e/specs/widget-crud.js

36 lines
1.1 KiB
JavaScript

// https://docs.cypress.io/api/introduction/api.html
describe("WIDGET", () => {
it("Performs all crud ops on widget", () => {
var unique = new Date().getTime();
cy.visit("/login");
cy.get("input[name=username]")
.clear()
.type(Cypress.env("adminusername"));
// {enter} causes the form to submit
cy.get("input[name=password]")
.clear()
.type(`${Cypress.env("adminpassword")}{enter}`);
cy.url().should("include", "/home-dashboard");
cy.visit("/widgets/0");
cy.url().should("include", "/widgets/0");
// cy.get("[data-cy=name]").type("E2E CRUD " + unique);
// // we should be redirected to /dashboard
// cy.url().should("include", "/home-dashboard");
// //navigate and confirm
// //open nav and home menu
// cy.get("[data-cy=navicon]").click();
// cy.get("[data-cy=home]").click();
// cy.get("[data-cy='nav/home-user-settings']").click();
// cy.url().should("include", "/home-user-settings");
// cy.get("[data-cy=contextmenu]").click();
// cy.get("[data-cy='app:logout']").click();
// cy.url().should("include", "/login");
});
});