From 95e72f4be98cb69bce1f16a87574bb4e325fa72f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Babi=C4=8D?= Date: Tue, 5 Jan 2021 13:43:21 +0100 Subject: [PATCH] insert test restart game --- cypress.json | 2 +- cypress/integration/spec.js | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 cypress/integration/spec.js diff --git a/cypress.json b/cypress.json index 0967ef4..ad95d90 100644 --- a/cypress.json +++ b/cypress.json @@ -1 +1 @@ -{} +{ "baseUrl": "http://localhost:5000" } diff --git a/cypress/integration/spec.js b/cypress/integration/spec.js new file mode 100644 index 0000000..a10ee7f --- /dev/null +++ b/cypress/integration/spec.js @@ -0,0 +1,16 @@ +/// + +describe("game should", () => { + it("be able to restart itself", () => { + cy.visit("/") + cy.get(".div0.gray").should("be.visible") + cy.get(".div1.red").should("be.visible") + cy.get(".div2.red").should("be.visible").click() + cy.get(".div0.blue").should("be.visible").click() + cy.get(".div0.red").should("be.visible") + cy.get(".div1.gray").should("be.visible") + cy.get(".div2.gray").should("be.visible") + cy.get(".restart").click() + cy.get(".div2.red").should("be.visible") + }) +})