Fix tests
This commit is contained in:
parent
c530d5fa34
commit
142fb18c17
|
@ -10,6 +10,7 @@ import {
|
|||
MonthlyQuotaName,
|
||||
PermissionLevel,
|
||||
QuotaUsageType,
|
||||
RelationshipType,
|
||||
Row,
|
||||
SaveTableRequest,
|
||||
SortOrder,
|
||||
|
@ -737,22 +738,26 @@ describe.each([
|
|||
const { linkedTable, firstRow, secondRow } = await tenancy.doInTenant(
|
||||
config.getTenantId(),
|
||||
async () => {
|
||||
const linkedTable = await config.createLinkedTable({
|
||||
name: generator.word(),
|
||||
type: "table",
|
||||
primary: ["id"],
|
||||
primaryDisplay: "id",
|
||||
schema: {
|
||||
id: {
|
||||
type: FieldType.AUTO,
|
||||
name: "id",
|
||||
autocolumn: true,
|
||||
constraints: {
|
||||
presence: true,
|
||||
const linkedTable = await config.createLinkedTable(
|
||||
RelationshipType.ONE_TO_MANY,
|
||||
["link"],
|
||||
{
|
||||
name: generator.word(),
|
||||
type: "table",
|
||||
primary: ["id"],
|
||||
primaryDisplay: "id",
|
||||
schema: {
|
||||
id: {
|
||||
type: FieldType.AUTO,
|
||||
name: "id",
|
||||
autocolumn: true,
|
||||
constraints: {
|
||||
presence: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
)
|
||||
const firstRow = await config.createRow({
|
||||
name: "Test Contact",
|
||||
description: "original description",
|
||||
|
|
|
@ -6,7 +6,7 @@ const { RelationshipType } = require("../../constants")
|
|||
const { cloneDeep } = require("lodash/fp")
|
||||
|
||||
describe("test the link controller", () => {
|
||||
let config = new TestConfig(false)
|
||||
let config = new TestConfig()
|
||||
let table1, table2, appId
|
||||
|
||||
beforeAll(async () => {
|
||||
|
|
|
@ -563,9 +563,9 @@ class TestConfiguration {
|
|||
}
|
||||
|
||||
async createLinkedTable(
|
||||
config?: Table,
|
||||
relationshipType = RelationshipType.ONE_TO_MANY,
|
||||
links: any = ["link"]
|
||||
links: any = ["link"],
|
||||
config?: Table
|
||||
) {
|
||||
if (!this.table) {
|
||||
throw "Must have created a table first."
|
||||
|
|
Loading…
Reference in New Issue