1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

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": { "company": {
"name": "Hoeger LLC", "name": "Hoeger LLC",
"catchPhrase": "Centralized empowering task-force", "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.server()
cy.visit('localhost:4001/_builder') cy.visit('localhost:4001/_builder')
// https://on.cypress.io/type // 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.createTable('dog', 'name', 'age')
cy.addRow('bob', '15') cy.addRow('bob', '15')
}) })

View file

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

View file

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