From 55aba6b824c98bfb6559f51c1da6549dc970af49 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 24 May 2021 16:32:42 +0100 Subject: [PATCH] Changing cypress commands. --- packages/builder/cypress/support/commands.js | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 62365cbe87..80d38937ac 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -12,22 +12,22 @@ Cypress.Commands.add("login", () => { cy.visit(`localhost:${Cypress.env("PORT")}/builder`) - cy.get("button").then(btn => { - const adminUserButton = "Create super admin user" - console.log(btn.first().first()) - if (!btn.first().contains(adminUserButton)) { - // create admin user - cy.get("input").first().type("test@test.com") - cy.get('input[type="password"]').first().type("test") - cy.get('input[type="password"]').eq(1).type("test") - cy.contains(adminUserButton).click() - } + // cy.get("button").then(btn => { + // const adminUserButton = "Create super admin user" + // console.log(btn.first().first()) + // if (!btn.first().contains(adminUserButton)) { + // // create admin user + // cy.get("input").first().type("test@test.com") + // cy.get('input[type="password"]').first().type("test") + // cy.get('input[type="password"]').eq(1).type("test") + // cy.contains(adminUserButton).click() + // } - // login - cy.get("input").first().type("test@test.com") - cy.get('input[type="password"]').type("test") - cy.contains("Login").click() - }) + // login + cy.get("input").first().type("test@test.com") + cy.get('input[type="password"]').type("test") + cy.contains("Login").click() + // }) }) })