This commit is contained in:
21
e2e/tests/regression/authorization/authenticate.js
Normal file
21
e2e/tests/regression/authorization/authenticate.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/// <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");
|
||||
|
||||
//-----------------------------------------------------
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user