wip: cypress tests
This commit is contained in:
parent
d870ccaf6c
commit
1a01edbacc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue