From 543b5bb3fdd8620b8b17ba7a37b0da07872d17e5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 23 Mar 2021 13:31:56 +0000 Subject: [PATCH] Update cypress tests --- packages/builder/cypress/integration/createBinding.spec.js | 2 +- packages/builder/cypress/integration/createComponents.spec.js | 2 +- packages/builder/src/builderStore/dataBinding.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/builder/cypress/integration/createBinding.spec.js b/packages/builder/cypress/integration/createBinding.spec.js index 99d741ab46..d901dc608d 100644 --- a/packages/builder/cypress/integration/createBinding.spec.js +++ b/packages/builder/cypress/integration/createBinding.spec.js @@ -20,7 +20,7 @@ context("Create Bindings", () => { cy.get("[data-cy=setting-text] input") .type("{{}{{}{{} Current User._id {}}{}}") .blur() - cy.getComponent(componentId).should("have.text", "{{{ user._id }}") + cy.getComponent(componentId).should("have.text", "{{{ [user].[_id] }}") }) }) diff --git a/packages/builder/cypress/integration/createComponents.spec.js b/packages/builder/cypress/integration/createComponents.spec.js index 56aca88837..3fc61f8d1a 100644 --- a/packages/builder/cypress/integration/createComponents.spec.js +++ b/packages/builder/cypress/integration/createComponents.spec.js @@ -43,7 +43,7 @@ context("Create Components", () => { it("should create a form and reset to match schema", () => { cy.addComponent("Form", "Form").then(() => { cy.get("[data-cy=Settings]").click() - cy.get("[data-cy=setting-datasource]") + cy.get("[data-cy=setting-dataSource]") .contains("Choose option") .click() cy.get(".dropdown") diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index d6bd53ac3f..1d23c8f488 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -194,7 +194,7 @@ const getContextBindings = (asset, componentId) => { */ const getUserBindings = () => { let bindings = [] - const schema = getSchemaForDatasource({ + const { schema } = getSchemaForDatasource({ type: "table", tableId: TableNames.USERS, })