From fbb7bf7413ba399d066e556f4622572aef2f22f2 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 8 Oct 2020 11:36:16 +0100 Subject: [PATCH] Fixing cypress tests --- packages/builder/cypress/support/commands.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/builder/cypress/support/commands.js b/packages/builder/cypress/support/commands.js index 05b30da98f..79fd83875d 100644 --- a/packages/builder/cypress/support/commands.js +++ b/packages/builder/cypress/support/commands.js @@ -66,12 +66,14 @@ Cypress.Commands.add("createTestTableWithData", () => { Cypress.Commands.add("createTable", tableName => { // Enter model name cy.contains("Create New Table").click() - cy.get(".menu-container") - .get("input") - .first() - .type(tableName) - - cy.contains("Save").click() + cy.get(".modal").within(() => { + cy.get("input") + .first() + .type(tableName) + cy.get(".buttons") + .contains("Create") + .click() + }) cy.contains(tableName).should("be.visible") })