kevmodrome
6 years ago
No known key found for this signature in database
GPG Key ID: E8F9CD141E63BF38
2 changed files with
4 additions and
8 deletions
-
packages/builder/cypress/integration/createBinding.spec.js
-
packages/builder/src/components/userInterface/PropertyControl.svelte
|
|
|
@ -2,9 +2,6 @@ context('Create a Binding', () => { |
|
|
|
before(() => { |
|
|
|
cy.visit('localhost:4001/_builder') |
|
|
|
cy.createApp('Binding App', 'Binding App Description') |
|
|
|
cy.createTable('dog') |
|
|
|
cy.addColumn('dog', 'name', 'Plain Text') |
|
|
|
cy.addRecord(["Rover"]) |
|
|
|
cy.navigateToFrontend() |
|
|
|
}) |
|
|
|
|
|
|
|
@ -16,7 +13,6 @@ context('Create a Binding', () => { |
|
|
|
cy.contains("Heading").click() |
|
|
|
cy.get("[data-cy=text-binding-button]").click() |
|
|
|
cy.get("[data-cy=binding-dropdown-modal]").contains('Input 1').click() |
|
|
|
cy.contains('Home{{ Input 1 }}') |
|
|
|
|
|
|
|
cy.get("[data-cy=binding-dropdown-modal] textarea").should('have.value', 'Home{{ Input 1 }}') |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
@ -20,12 +20,12 @@ |
|
|
|
handleChange(key, temporaryBindableValue) |
|
|
|
} |
|
|
|
|
|
|
|
let bindableProperties |
|
|
|
let bindableProperties = [] |
|
|
|
|
|
|
|
let anchor |
|
|
|
let dropdown |
|
|
|
|
|
|
|
async function getBindableProperties() { |
|
|
|
function getBindableProperties() { |
|
|
|
// Get all bindableProperties |
|
|
|
bindableProperties = fetchBindableProperties({ |
|
|
|
componentInstanceId: $store.currentComponentInfo._id, |
|
|
|
@ -36,7 +36,7 @@ |
|
|
|
} |
|
|
|
|
|
|
|
const CAPTURE_VAR_INSIDE_MUSTACHE = /{{([^}]+)}}/g |
|
|
|
async function replaceBindings(textWithBindings) { |
|
|
|
function replaceBindings(textWithBindings) { |
|
|
|
getBindableProperties() |
|
|
|
// Find all instances of mustasche |
|
|
|
const boundValues = textWithBindings.match(CAPTURE_VAR_INSIDE_MUSTACHE) |
|
|
|
|