This commit is contained in:
@@ -17,7 +17,19 @@ describe("WIDGET", () => {
|
|||||||
cy.url().should("include", "/home-dashboard");
|
cy.url().should("include", "/home-dashboard");
|
||||||
cy.visit("/widgets/0");
|
cy.visit("/widgets/0");
|
||||||
cy.url().should("include", "/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
|
// // we should be redirected to /dashboard
|
||||||
// cy.url().should("include", "/home-dashboard");
|
// cy.url().should("include", "/home-dashboard");
|
||||||
|
|||||||
Reference in New Issue
Block a user