Renames
This commit is contained in:
parent
a555734519
commit
cb53d31833
|
@ -581,7 +581,7 @@ describe.each([
|
||||||
tableId: InternalTable.USER_METADATA,
|
tableId: InternalTable.USER_METADATA,
|
||||||
}
|
}
|
||||||
|
|
||||||
let table = await config.api.table.create({
|
let table = await config.api.table.save({
|
||||||
name: "TestTable",
|
name: "TestTable",
|
||||||
type: "table",
|
type: "table",
|
||||||
sourceType: TableSourceType.INTERNAL,
|
sourceType: TableSourceType.INTERNAL,
|
||||||
|
@ -1690,7 +1690,7 @@ describe.each([
|
||||||
tableConfig.sourceType = TableSourceType.EXTERNAL
|
tableConfig.sourceType = TableSourceType.EXTERNAL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const table = await config.api.table.create({
|
const table = await config.api.table.save({
|
||||||
...tableConfig,
|
...tableConfig,
|
||||||
schema: {
|
schema: {
|
||||||
...tableConfig.schema,
|
...tableConfig.schema,
|
||||||
|
|
|
@ -438,7 +438,7 @@ describe("/tables", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should successfully migrate a one-to-many user relationship to a user column", async () => {
|
it("should successfully migrate a one-to-many user relationship to a user column", async () => {
|
||||||
const table = await config.api.table.create({
|
const table = await config.api.table.save({
|
||||||
name: "table",
|
name: "table",
|
||||||
type: "table",
|
type: "table",
|
||||||
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
||||||
|
@ -496,7 +496,7 @@ describe("/tables", () => {
|
||||||
// We found a bug just after releasing this feature where if the row was created from the
|
// We found a bug just after releasing this feature where if the row was created from the
|
||||||
// users table, not the table linking to it, the migration would succeed but lose the data.
|
// users table, not the table linking to it, the migration would succeed but lose the data.
|
||||||
// This happened because the order of the documents in the link was reversed.
|
// This happened because the order of the documents in the link was reversed.
|
||||||
const table = await config.api.table.create({
|
const table = await config.api.table.save({
|
||||||
name: "table",
|
name: "table",
|
||||||
type: "table",
|
type: "table",
|
||||||
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
||||||
|
@ -554,7 +554,7 @@ describe("/tables", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should successfully migrate a many-to-many user relationship to a users column", async () => {
|
it("should successfully migrate a many-to-many user relationship to a users column", async () => {
|
||||||
const table = await config.api.table.create({
|
const table = await config.api.table.save({
|
||||||
name: "table",
|
name: "table",
|
||||||
type: "table",
|
type: "table",
|
||||||
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
||||||
|
@ -611,7 +611,7 @@ describe("/tables", () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it("should successfully migrate a many-to-one user relationship to a users column", async () => {
|
it("should successfully migrate a many-to-one user relationship to a users column", async () => {
|
||||||
const table = await config.api.table.create({
|
const table = await config.api.table.save({
|
||||||
name: "table",
|
name: "table",
|
||||||
type: "table",
|
type: "table",
|
||||||
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
||||||
|
@ -670,7 +670,7 @@ describe("/tables", () => {
|
||||||
describe("unhappy paths", () => {
|
describe("unhappy paths", () => {
|
||||||
let table: Table
|
let table: Table
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
table = await config.api.table.create({
|
table = await config.api.table.save({
|
||||||
name: "table",
|
name: "table",
|
||||||
type: "table",
|
type: "table",
|
||||||
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
sourceId: INTERNAL_TABLE_SOURCE_ID,
|
||||||
|
|
|
@ -67,7 +67,7 @@ describe("test the update row action", () => {
|
||||||
tableId: InternalTable.USER_METADATA,
|
tableId: InternalTable.USER_METADATA,
|
||||||
}
|
}
|
||||||
|
|
||||||
let table = await config.api.table.create({
|
let table = await config.api.table.save({
|
||||||
name: uuid.v4(),
|
name: uuid.v4(),
|
||||||
type: "table",
|
type: "table",
|
||||||
sourceType: TableSourceType.INTERNAL,
|
sourceType: TableSourceType.INTERNAL,
|
||||||
|
@ -120,7 +120,7 @@ describe("test the update row action", () => {
|
||||||
tableId: InternalTable.USER_METADATA,
|
tableId: InternalTable.USER_METADATA,
|
||||||
}
|
}
|
||||||
|
|
||||||
let table = await config.api.table.create({
|
let table = await config.api.table.save({
|
||||||
name: uuid.v4(),
|
name: uuid.v4(),
|
||||||
type: "table",
|
type: "table",
|
||||||
sourceType: TableSourceType.INTERNAL,
|
sourceType: TableSourceType.INTERNAL,
|
||||||
|
|
|
@ -9,7 +9,7 @@ describe("tables", () => {
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
await config.init()
|
await config.init()
|
||||||
table = await config.api.table.create(basicTable())
|
table = await config.api.table.save(basicTable())
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("getTables", () => {
|
describe("getTables", () => {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export class TableAPI extends TestAPI {
|
||||||
super(config)
|
super(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
create = async (
|
save = async (
|
||||||
data: SaveTableRequest,
|
data: SaveTableRequest,
|
||||||
{ expectStatus } = { expectStatus: 200 }
|
{ expectStatus } = { expectStatus: 200 }
|
||||||
): Promise<SaveTableResponse> => {
|
): Promise<SaveTableResponse> => {
|
||||||
|
|
Loading…
Reference in New Issue