From 3daa9c60c5eb41cb14910e79d9cc82cdd37727db Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 31 Mar 2020 20:46:07 +0000 Subject: [PATCH] --- ayanova/devdocs/todo.txt | 5 +++++ ayanova/tests/e2e/specs/widget-crud.js | 29 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 ayanova/tests/e2e/specs/widget-crud.js diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index a007248b..552b7dce 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -49,9 +49,14 @@ CURRENT TODOs @@@@@@@@@@@ ROADMAP STAGE 2: + + todo: Client automated testing - Need several as basis for all future, make sure it's right. +todo: new widget? how to? from grid? + - no obvious way to make a new widget except in picklist or duplicate option + - There should be a new option (in addition to duplicate) within the existing widget form because it makes sense to want to make a new one while editing previous one todo: Make errorBoxError message box on all forms a component instead as it's just boilerplate - For consistency and so can change it later at will without re-editing all forms diff --git a/ayanova/tests/e2e/specs/widget-crud.js b/ayanova/tests/e2e/specs/widget-crud.js new file mode 100644 index 00000000..31085c05 --- /dev/null +++ b/ayanova/tests/e2e/specs/widget-crud.js @@ -0,0 +1,29 @@ +// https://docs.cypress.io/api/introduction/api.html + +describe("Login", () => { + it("Successfully logs in navigate and log out", () => { + 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}`); + + // 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"); + }); +});