1
0
Fork 0
mirror of synced 2024-08-09 15:17:57 +12:00

Run attachments only on internal

This commit is contained in:
Adria Navarro 2023-09-12 18:07:50 +02:00
parent 88c68cfe58
commit a537b17b23

View file

@ -853,31 +853,32 @@ describe.each([
})
})
describe("attachments", () => {
it("should allow enriching attachment rows", async () => {
const table = await config.createAttachmentTable()
const attachmentId = `${structures.uuid()}.csv`
const row = await createRow(table._id, {
name: "test",
description: "test",
attachment: [
{
key: `${config.getAppId()}/attachments/${attachmentId}`,
},
],
tableId: table._id,
})
// the environment needs configured for this
await setup.switchToSelfHosted(async () => {
return context.doInAppContext(config.getAppId(), async () => {
const enriched = await outputProcessing(table, [row])
expect((enriched as Row[])[0].attachment[0].url).toBe(
`/files/signed/prod-budi-app-assets/${config.getProdAppId()}/attachments/${attachmentId}`
)
isInternal &&
describe("attachments", () => {
it("should allow enriching attachment rows", async () => {
const table = await config.createAttachmentTable()
const attachmentId = `${structures.uuid()}.csv`
const row = await createRow(table._id, {
name: "test",
description: "test",
attachment: [
{
key: `${config.getAppId()}/attachments/${attachmentId}`,
},
],
tableId: table._id,
})
// the environment needs configured for this
await setup.switchToSelfHosted(async () => {
return context.doInAppContext(config.getAppId(), async () => {
const enriched = await outputProcessing(table, [row])
expect((enriched as Row[])[0].attachment[0].url).toBe(
`/files/signed/prod-budi-app-assets/${config.getProdAppId()}/attachments/${attachmentId}`
)
})
})
})
})
})
describe("exportData", () => {
it("should allow exporting all columns", async () => {