Browse Source

test: sso client - CRUD - unit test

pull/7569/head
Pranav C 10 months ago
parent
commit
ff20a2d1e4
  1. 7
      packages/nocodb/tests/unit/init/cleanupMeta.ts
  2. 4
      packages/nocodb/tests/unit/init/index.ts
  3. 3
      packages/nocodb/tests/unit/rest/index.test.ts

7
packages/nocodb/tests/unit/init/cleanupMeta.ts

@ -1,8 +1,7 @@
import { Base, Model } from '../../../src/models'; import { Base, Model } from '~/models';
import NcConnectionMgrv2 from '../../../src/utils/common/NcConnectionMgrv2'; import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2';
import { orderedMetaTables } from '../../../src/utils/globals'; import { orderedMetaTables } from '~/utils/globals';
import TestDbMngr from '../TestDbMngr'; import TestDbMngr from '../TestDbMngr';
import { isPg } from './db';
const dropTablesAllNonExternalProjects = async () => { const dropTablesAllNonExternalProjects = async () => {
const bases = await Base.list({}); const bases = await Base.list({});

4
packages/nocodb/tests/unit/init/index.ts

@ -41,7 +41,9 @@ export default async function (forceReset = false, roles = 'editor') {
const { token, user } = await createUser({ app: server }, { roles }); const { token, user } = await createUser({ app: server }, { roles });
const extra: any = {}; const extra: {
fk_workspace_id?: string;
} = {};
// create ws for ee // create ws for ee
if (process.env.EE === 'true') { if (process.env.EE === 'true') {

3
packages/nocodb/tests/unit/rest/index.test.ts

@ -13,8 +13,10 @@ import groupByTest from './tests/groupby.test';
import formulaTests from './tests/formula.test'; import formulaTests from './tests/formula.test';
let workspaceTest = () => {}; let workspaceTest = () => {};
let ssoTest = () => {};
if (process.env.EE === 'true') { if (process.env.EE === 'true') {
workspaceTest = require('./tests/ee/workspace.test').default; workspaceTest = require('./tests/ee/workspace.test').default;
ssoTest = require('./tests/ee/sso.test').default;
} }
// import layoutTests from './tests/layout.test'; // import layoutTests from './tests/layout.test';
// import widgetTest from './tests/widget.test'; // import widgetTest from './tests/widget.test';
@ -33,6 +35,7 @@ function restTests() {
groupByTest(); groupByTest();
workspaceTest(); workspaceTest();
formulaTests(); formulaTests();
ssoTest();
// Enable for dashboard feature // Enable for dashboard feature
// widgetTest(); // widgetTest();

Loading…
Cancel
Save