diff --git a/packages/server/src/api/routes/tests/permissions.spec.ts b/packages/server/src/api/routes/tests/permissions.spec.ts index f03f84f466..e0ec27949f 100644 --- a/packages/server/src/api/routes/tests/permissions.spec.ts +++ b/packages/server/src/api/routes/tests/permissions.spec.ts @@ -263,11 +263,11 @@ describe("/permission", () => { describe("default permissions", () => { it("legacy views", async () => { - const legacyView = await config.createView() + const legacyView = await config.createLegacyView() const res = await config.api.permission.get(legacyView.name) - expect(res.body).toBe({ + expect(res.body).toEqual({ read: "BASIC", }) }) diff --git a/packages/server/src/api/routes/tests/row.spec.ts b/packages/server/src/api/routes/tests/row.spec.ts index f28b96b9d8..f7878b2182 100644 --- a/packages/server/src/api/routes/tests/row.spec.ts +++ b/packages/server/src/api/routes/tests/row.spec.ts @@ -670,7 +670,7 @@ describe("/rows", () => { }) it("should be able to run on a view", async () => { - const view = await config.createView() + const view = await config.createLegacyView() const row = await config.createRow() const rowUsage = await getRowUsage() const queryUsage = await getQueryUsage() diff --git a/packages/server/src/api/routes/tests/table.spec.ts b/packages/server/src/api/routes/tests/table.spec.ts index 04911e5505..9914e6d66f 100644 --- a/packages/server/src/api/routes/tests/table.spec.ts +++ b/packages/server/src/api/routes/tests/table.spec.ts @@ -87,7 +87,7 @@ describe("/tables", () => { it("updates all the row fields for a table when a schema key is renamed", async () => { const testTable = await config.createTable() - await config.createView({ + await config.createLegacyView({ name: "TestView", field: "Price", calculation: "stats", @@ -254,7 +254,7 @@ describe("/tables", () => { })) await config.api.viewV2.create({ tableId }) - await config.createView({ tableId, name: generator.guid() }) + await config.createLegacyView({ tableId, name: generator.guid() }) const res = await config.api.table.fetch() diff --git a/packages/server/src/api/routes/tests/viewV2.spec.ts b/packages/server/src/api/routes/tests/viewV2.spec.ts index a9c9f3a320..5e8ae09e55 100644 --- a/packages/server/src/api/routes/tests/viewV2.spec.ts +++ b/packages/server/src/api/routes/tests/viewV2.spec.ts @@ -296,7 +296,7 @@ describe.each([ }) it("cannot update views v1", async () => { - const viewV1 = await config.createView() + const viewV1 = await config.createLegacyView() await config.api.viewV2.update( { ...viewV1, diff --git a/packages/server/src/migrations/tests/index.spec.ts b/packages/server/src/migrations/tests/index.spec.ts index 2465c930b4..b64cad26c1 100644 --- a/packages/server/src/migrations/tests/index.spec.ts +++ b/packages/server/src/migrations/tests/index.spec.ts @@ -50,9 +50,9 @@ describe("migrations", () => { await config.createRole() await config.createRole() await config.createTable() - await config.createView() + await config.createLegacyView() await config.createTable() - await config.createView(structures.view(config.table!._id!)) + await config.createLegacyView(structures.view(config.table!._id!)) await config.createScreen() await config.createScreen() diff --git a/packages/server/src/tests/utilities/TestConfiguration.ts b/packages/server/src/tests/utilities/TestConfiguration.ts index c1db54fe60..81bfa0abbd 100644 --- a/packages/server/src/tests/utilities/TestConfiguration.ts +++ b/packages/server/src/tests/utilities/TestConfiguration.ts @@ -622,7 +622,7 @@ class TestConfiguration { // VIEW - async createView(config?: any) { + async createLegacyView(config?: any) { if (!this.table) { throw "Test requires table to be configured." }