From c43d35441421546802940aa718b2b85d671da3cf Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Mon, 12 Dec 2022 11:03:17 +0700 Subject: [PATCH] Attempt to fix studio tests --- studio/jest.config.js | 1 + studio/stores/pgmeta/SchemaStore.ts | 17 ++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/studio/jest.config.js b/studio/jest.config.js index cb7f3c95b01..03b07573f70 100644 --- a/studio/jest.config.js +++ b/studio/jest.config.js @@ -3,6 +3,7 @@ module.exports = { moduleDirectories: ['', 'node_modules'], setupFiles: ['jest-canvas-mock', './tests/setup/radix'], testEnvironment: 'jsdom', + testTimeout: 20000, testRegex: '(.*\\.test.(js|jsx|ts|tsx)$)', transform: { '^.+\\.(t|j)sx?$': 'ts-jest' }, globals: { diff --git a/studio/stores/pgmeta/SchemaStore.ts b/studio/stores/pgmeta/SchemaStore.ts index 6bc161ef674..7a0082db225 100644 --- a/studio/stores/pgmeta/SchemaStore.ts +++ b/studio/stores/pgmeta/SchemaStore.ts @@ -28,14 +28,13 @@ export default class SchemaStore extends PostgresMetaInterface { } async loadViews(schema: string) { - return [] as any - // const query = ` - // select schemaname as schema, viewname as name from pg_catalog.pg_views - // where schemaname = '${schema}' - // order by schemaname, viewname; - // ` - // const views = await this.rootStore.meta.query(query) - // this.views = views - // return views + const query = ` + select schemaname as schema, viewname as name from pg_catalog.pg_views + where schemaname = '${schema}' + order by schemaname, viewname; + ` + const views = await this.rootStore.meta.query(query) + this.views = views + return views } }