Updating test cases.

This commit is contained in:
mike12345567 2020-10-13 11:19:34 +01:00
parent 5354d66366
commit 31b744e2d5
4 changed files with 13 additions and 13 deletions

View File

@ -226,7 +226,7 @@
"company": {
"name": "Hoeger LLC",
"catchPhrase": "Centralized empowering task-force",
"bs": "target end-to-end models"
"bs": "target end-to-end tables"
}
}
]

View File

@ -4,7 +4,7 @@ xcontext('Create Components', () => {
cy.server()
cy.visit('localhost:4001/_builder')
// https://on.cypress.io/type
cy.createApp('Model App', 'Model App Description')
cy.createApp('Table App', 'Table App Description')
cy.createTable('dog', 'name', 'age')
cy.addRow('bob', '15')
})

View File

@ -3,7 +3,7 @@ context('Screen Tests', () => {
before(() => {
cy.server()
cy.visit('localhost:4001/_builder')
cy.createApp('Conor Cy App', 'Model App Description')
cy.createApp('Conor Cy App', 'Table App Description')
cy.navigateToFrontend()
})

View File

@ -33,15 +33,15 @@ describe("fetch bindable properties", () => {
const namebinding = contextBindings.find(b => b.runtimeBinding === "data.name")
expect(namebinding).toBeDefined()
expect(namebinding.readableBinding).toBe("list-name.Test Model.name")
expect(namebinding.readableBinding).toBe("list-name.Test Table.name")
const descriptionbinding = contextBindings.find(b => b.runtimeBinding === "data.description")
expect(descriptionbinding).toBeDefined()
expect(descriptionbinding.readableBinding).toBe("list-name.Test Model.description")
expect(descriptionbinding.readableBinding).toBe("list-name.Test Table.description")
const idbinding = contextBindings.find(b => b.runtimeBinding === "data._id")
expect(idbinding).toBeDefined()
expect(idbinding.readableBinding).toBe("list-name.Test Model._id")
expect(idbinding.readableBinding).toBe("list-name.Test Table._id")
})
it("should return table schema, for grantparent context", () => {
@ -55,19 +55,19 @@ describe("fetch bindable properties", () => {
const namebinding_parent = contextBindings.find(b => b.runtimeBinding === "parent.data.name")
expect(namebinding_parent).toBeDefined()
expect(namebinding_parent.readableBinding).toBe("list-name.Test Model.name")
expect(namebinding_parent.readableBinding).toBe("list-name.Test Table.name")
const descriptionbinding_parent = contextBindings.find(b => b.runtimeBinding === "parent.data.description")
expect(descriptionbinding_parent).toBeDefined()
expect(descriptionbinding_parent.readableBinding).toBe("list-name.Test Model.description")
expect(descriptionbinding_parent.readableBinding).toBe("list-name.Test Table.description")
const namebinding_own = contextBindings.find(b => b.runtimeBinding === "data.name")
expect(namebinding_own).toBeDefined()
expect(namebinding_own.readableBinding).toBe("child-list-name.Test Model.name")
expect(namebinding_own.readableBinding).toBe("child-list-name.Test Table.name")
const descriptionbinding_own = contextBindings.find(b => b.runtimeBinding === "data.description")
expect(descriptionbinding_own).toBeDefined()
expect(descriptionbinding_own.readableBinding).toBe("child-list-name.Test Model.description")
expect(descriptionbinding_own.readableBinding).toBe("child-list-name.Test Table.description")
})
it("should return bindable component props, from components in same context", () => {
@ -126,7 +126,7 @@ const testData = () => {
_id: "list-id",
_component: "@budibase/standard-components/list",
_instanceName: "list-name",
table: { isTable: true, tableId: "test-table-id", label: "Test Model", name: "all_test-table-id" },
table: { isTable: true, tableId: "test-table-id", label: "Test Table", name: "all_test-table-id" },
_children: [
{
_id: "list-item-heading-id",
@ -144,7 +144,7 @@ const testData = () => {
_id: "child-list-id",
_component: "@budibase/standard-components/list",
_instanceName: "child-list-name",
table: { isTable: true, tableId: "test-table-id", label: "Test Model", name: "all_test-table-id"},
table: { isTable: true, tableId: "test-table-id", label: "Test Table", name: "all_test-table-id"},
_children: [
{
_id: "child-list-item-heading-id",
@ -168,7 +168,7 @@ const testData = () => {
const tables = [{
_id: "test-table-id",
name: "Test Model",
name: "Test Table",
schema: {
name: {
type: "string"