Files
raven-test/e2e/tests/regression/authorization/authenticate.js
2021-10-29 17:46:34 +00:00

22 lines
648 B
JavaScript

/// <reference types="cypress" />
describe("When authenticating", () => {
it("logs in and logs out superuser without error", () => {
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}`);
//LOGOUT
cy.get("[data-cy=navicon]").click();
cy.contains("AyaNova SuperUser");
cy.get("[data-cy=logout]").click({force:true});
cy.url().should("include", "/login");
//-----------------------------------------------------
});
});