Renamings

This commit is contained in:
Adria Navarro 2023-09-04 12:17:37 +02:00
parent 8b5700774b
commit 900c773ce9
6 changed files with 9 additions and 9 deletions

View File

@ -263,11 +263,11 @@ describe("/permission", () => {
describe("default permissions", () => { describe("default permissions", () => {
it("legacy views", async () => { it("legacy views", async () => {
const legacyView = await config.createView() const legacyView = await config.createLegacyView()
const res = await config.api.permission.get(legacyView.name) const res = await config.api.permission.get(legacyView.name)
expect(res.body).toBe({ expect(res.body).toEqual({
read: "BASIC", read: "BASIC",
}) })
}) })

View File

@ -670,7 +670,7 @@ describe("/rows", () => {
}) })
it("should be able to run on a view", async () => { 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 row = await config.createRow()
const rowUsage = await getRowUsage() const rowUsage = await getRowUsage()
const queryUsage = await getQueryUsage() const queryUsage = await getQueryUsage()

View File

@ -87,7 +87,7 @@ describe("/tables", () => {
it("updates all the row fields for a table when a schema key is renamed", async () => { it("updates all the row fields for a table when a schema key is renamed", async () => {
const testTable = await config.createTable() const testTable = await config.createTable()
await config.createView({ await config.createLegacyView({
name: "TestView", name: "TestView",
field: "Price", field: "Price",
calculation: "stats", calculation: "stats",
@ -254,7 +254,7 @@ describe("/tables", () => {
})) }))
await config.api.viewV2.create({ tableId }) 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() const res = await config.api.table.fetch()

View File

@ -296,7 +296,7 @@ describe.each([
}) })
it("cannot update views v1", async () => { it("cannot update views v1", async () => {
const viewV1 = await config.createView() const viewV1 = await config.createLegacyView()
await config.api.viewV2.update( await config.api.viewV2.update(
{ {
...viewV1, ...viewV1,

View File

@ -50,9 +50,9 @@ describe("migrations", () => {
await config.createRole() await config.createRole()
await config.createRole() await config.createRole()
await config.createTable() await config.createTable()
await config.createView() await config.createLegacyView()
await config.createTable() 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()
await config.createScreen() await config.createScreen()

View File

@ -622,7 +622,7 @@ class TestConfiguration {
// VIEW // VIEW
async createView(config?: any) { async createLegacyView(config?: any) {
if (!this.table) { if (!this.table) {
throw "Test requires table to be configured." throw "Test requires table to be configured."
} }