This commit is contained in:
2020-03-31 21:00:13 +00:00
parent 3daa9c60c5
commit 61cf9a9dd4
5 changed files with 40 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
// https://docs.cypress.io/api/introduction/api.html
describe("Login", () => {
it("Successfully logs in navigate and log out", () => {
describe("WIDGET", () => {
it("Performs all crud ops on widget", () => {
cy.visit("/login");
cy.get("input[name=username]")
@@ -13,17 +13,21 @@ describe("Login", () => {
.clear()
.type(`${Cypress.env("adminpassword")}{enter}`);
// we should be redirected to /dashboard
cy.url().should("include", "/home-dashboard");
cy.visit("/widgets/0");
cy.url().should("include", "/widgets/0");
//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");
// // 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");
});
});