mirror of https://github.com/nocodb/nocodb
20 changed files with 64 additions and 66 deletions
@ -1,4 +1,4 @@ |
|||||||
import { NcConfigFactory } from "../../../src/lib"; |
import { NcConfigFactory } from "../../src/lib"; |
||||||
|
|
||||||
|
|
||||||
const sakilaTableNames = [ |
const sakilaTableNames = [ |
@ -1,12 +1,12 @@ |
|||||||
import { UITypes } from 'nocodb-sdk'; |
import { UITypes } from 'nocodb-sdk'; |
||||||
import request from 'supertest'; |
import request from 'supertest'; |
||||||
import Column from '../../../../../src/lib/models/Column'; |
import Column from '../../../src/lib/models/Column'; |
||||||
import FormViewColumn from '../../../../../src/lib/models/FormViewColumn'; |
import FormViewColumn from '../../../src/lib/models/FormViewColumn'; |
||||||
import GalleryViewColumn from '../../../../../src/lib/models/GalleryViewColumn'; |
import GalleryViewColumn from '../../../src/lib/models/GalleryViewColumn'; |
||||||
import GridViewColumn from '../../../../../src/lib/models/GridViewColumn'; |
import GridViewColumn from '../../../src/lib/models/GridViewColumn'; |
||||||
import Model from '../../../../../src/lib/models/Model'; |
import Model from '../../../src/lib/models/Model'; |
||||||
import Project from '../../../../../src/lib/models/Project'; |
import Project from '../../../src/lib/models/Project'; |
||||||
import View from '../../../../../src/lib/models/View'; |
import View from '../../../src/lib/models/View'; |
||||||
|
|
||||||
const defaultColumns = [ |
const defaultColumns = [ |
||||||
{ |
{ |
@ -1,6 +1,6 @@ |
|||||||
import request from 'supertest'; |
import request from 'supertest'; |
||||||
import Project from '../../../../../src/lib/models/Project'; |
import Project from '../../../src/lib/models/Project'; |
||||||
import { sakilaDbName } from '../../dbConfig'; |
import { sakilaDbName } from '../dbConfig'; |
||||||
|
|
||||||
const externalProjectConfig = { |
const externalProjectConfig = { |
||||||
title: 'sakila', |
title: 'sakila', |
@ -1,11 +1,11 @@ |
|||||||
import { ColumnType, UITypes } from 'nocodb-sdk'; |
import { ColumnType, UITypes } from 'nocodb-sdk'; |
||||||
import request from 'supertest'; |
import request from 'supertest'; |
||||||
import Column from '../../../../../src/lib/models/Column'; |
import Column from '../../../src/lib/models/Column'; |
||||||
import Filter from '../../../../../src/lib/models/Filter'; |
import Filter from '../../../src/lib/models/Filter'; |
||||||
import Model from '../../../../../src/lib/models/Model'; |
import Model from '../../../src/lib/models/Model'; |
||||||
import Project from '../../../../../src/lib/models/Project'; |
import Project from '../../../src/lib/models/Project'; |
||||||
import Sort from '../../../../../src/lib/models/Sort'; |
import Sort from '../../../src/lib/models/Sort'; |
||||||
import NcConnectionMgrv2 from '../../../../../src/lib/utils/common/NcConnectionMgrv2'; |
import NcConnectionMgrv2 from '../../../src/lib/utils/common/NcConnectionMgrv2'; |
||||||
|
|
||||||
const rowValue = (column: ColumnType, index: number) => { |
const rowValue = (column: ColumnType, index: number) => { |
||||||
switch (column.uidt) { |
switch (column.uidt) { |
@ -1,6 +1,6 @@ |
|||||||
import request from 'supertest'; |
import request from 'supertest'; |
||||||
import Model from '../../../../../src/lib/models/Model'; |
import Model from '../../../src/lib/models/Model'; |
||||||
import Project from '../../../../../src/lib/models/Project'; |
import Project from '../../../src/lib/models/Project'; |
||||||
import { defaultColumns } from './column'; |
import { defaultColumns } from './column'; |
||||||
|
|
||||||
const defaultTableValue = { |
const defaultTableValue = { |
@ -1,5 +1,5 @@ |
|||||||
import request from 'supertest'; |
import request from 'supertest'; |
||||||
import User from '../../../../../src/lib/models/User'; |
import User from '../../../src/lib/models/User'; |
||||||
|
|
||||||
const defaultUserArgs = { |
const defaultUserArgs = { |
||||||
email: 'test@example.com', |
email: 'test@example.com', |
@ -1,8 +1,7 @@ |
|||||||
import { UITypes, ViewTypes } from 'nocodb-sdk'; |
import { ViewTypes } from 'nocodb-sdk'; |
||||||
import request from 'supertest'; |
import request from 'supertest'; |
||||||
import Column from '../../../../../src/lib/models/Column'; |
import Model from '../../../src/lib/models/Model'; |
||||||
import Model from '../../../../../src/lib/models/Model'; |
import View from '../../../src/lib/models/View'; |
||||||
import View from '../../../../../src/lib/models/View'; |
|
||||||
|
|
||||||
const createView = async (context, {title, table, type}: {title: string, table: Model, type: ViewTypes}) => { |
const createView = async (context, {title, table, type}: {title: string, table: Model, type: ViewTypes}) => { |
||||||
const viewTypeStr = (type) => { |
const viewTypeStr = (type) => { |
@ -1,7 +1,7 @@ |
|||||||
import Model from "../../../../src/lib/models/Model"; |
import Model from "../../../src/lib/models/Model"; |
||||||
import Project from "../../../../src/lib/models/Project"; |
import Project from "../../../src/lib/models/Project"; |
||||||
import NcConnectionMgrv2 from "../../../../src/lib/utils/common/NcConnectionMgrv2"; |
import NcConnectionMgrv2 from "../../../src/lib/utils/common/NcConnectionMgrv2"; |
||||||
import { orderedMetaTables } from "../../../../src/lib/utils/globals"; |
import { orderedMetaTables } from "../../../src/lib/utils/globals"; |
||||||
|
|
||||||
const dropTablesAllNonExternalProjects = async (knexClient) => { |
const dropTablesAllNonExternalProjects = async (knexClient) => { |
||||||
const projects = await Project.list({}); |
const projects = await Project.list({}); |
@ -1,4 +1,4 @@ |
|||||||
import { DbConfig } from "../../../../src/interface/config"; |
import { DbConfig } from "../../../src/interface/config"; |
||||||
|
|
||||||
|
|
||||||
const isSqlite = (context) => |
const isSqlite = (context) => |
@ -1,12 +1,12 @@ |
|||||||
|
|
||||||
import express from 'express'; |
import express from 'express'; |
||||||
import knex from 'knex'; |
import knex from 'knex'; |
||||||
import { Noco } from '../../../../src/lib'; |
import { Noco } from '../../../src/lib'; |
||||||
|
|
||||||
import { dbConfig, dbName, sakilaDbName } from '../dbConfig'; |
import { dbConfig, dbName, sakilaDbName } from '../dbConfig'; |
||||||
import cleanupMeta from './cleanupMeta'; |
import cleanupMeta from './cleanupMeta'; |
||||||
import {cleanUpSakila, resetAndSeedSakila} from './cleanupSakila'; |
import {cleanUpSakila, resetAndSeedSakila} from './cleanupSakila'; |
||||||
import { createUser } from '../tests/factory/user'; |
import { createUser } from '../factory/user'; |
||||||
|
|
||||||
let server; |
let server; |
||||||
const knexClient = knex(dbConfig); |
const knexClient = knex(dbConfig); |
Loading…
Reference in new issue