Add a test for row exports on Google Sheets.
This commit is contained in:
parent
4d0f84fdeb
commit
27f6fa7de4
|
@ -10,6 +10,7 @@ import {
|
||||||
TableSourceType,
|
TableSourceType,
|
||||||
} from "@budibase/types"
|
} from "@budibase/types"
|
||||||
import { GoogleSheetsMock } from "./utils/googlesheets"
|
import { GoogleSheetsMock } from "./utils/googlesheets"
|
||||||
|
import rows from "src/sdk/app/rows"
|
||||||
|
|
||||||
describe("Google Sheets Integration", () => {
|
describe("Google Sheets Integration", () => {
|
||||||
const config = new TestConfiguration()
|
const config = new TestConfiguration()
|
||||||
|
@ -244,6 +245,20 @@ describe("Google Sheets Integration", () => {
|
||||||
expect.arrayContaining(Array.from({ length: 248 }, (_, i) => `${i}`))
|
expect.arrayContaining(Array.from({ length: 248 }, (_, i) => `${i}`))
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("can export rows", async () => {
|
||||||
|
const resp = await config.api.row.exportRows(table._id!, {})
|
||||||
|
const parsed = JSON.parse(resp)
|
||||||
|
expect(parsed.length).toEqual(2)
|
||||||
|
expect(parsed[0]).toMatchObject({
|
||||||
|
name: "Test Contact 1",
|
||||||
|
description: "original description 1",
|
||||||
|
})
|
||||||
|
expect(parsed[1]).toMatchObject({
|
||||||
|
name: "Test Contact 2",
|
||||||
|
description: "original description 2",
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe("update", () => {
|
describe("update", () => {
|
||||||
|
|
Loading…
Reference in New Issue