From 1d6c6e248612161a1b7d5adca7d02a591147df60 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 31 Mar 2020 21:31:49 +0000 Subject: [PATCH] --- ayanova/tests/e2e/specs/widget-crud.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ayanova/tests/e2e/specs/widget-crud.js b/ayanova/tests/e2e/specs/widget-crud.js index 255b24f0..5d7a8afc 100644 --- a/ayanova/tests/e2e/specs/widget-crud.js +++ b/ayanova/tests/e2e/specs/widget-crud.js @@ -17,7 +17,19 @@ describe("WIDGET", () => { 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); + //first edit to break the required rules + cy.get("[data-cy=active]").check({ force: true }); //have to force, for some reason it thinks it's covered + //now name and price sb required rule broken + cy.contains("Name is a required field"); + cy.contains("Price is a required field"); + //enter name + cy.get("[data-cy=name]").type("E2E CRUD " + unique); + //confirm error went away + cy.contains("Name is a required field").should("not.exist"); + + cy.get("[data-cy=count]").type("123"); + cy.get("[data-cy=dollarAmount]").type("123.45"); + cy.contains("Price is a required field").should("not.exist"); // // we should be redirected to /dashboard // cy.url().should("include", "/home-dashboard");