* feat(richtext-lexical): 'bottom' position value for plugins * feat: TestRecorderFeature * chore: restructuring to seed and clear db before each test * chore: make sure all tests pass * chore: make sure indexes are created in seed.ts - this fixes one erroring test * chore: speed up test runs through db snapshots * chore: support drizzle when resetting db * chore: simplify seeding process, by moving boilerplate db reset / snapshot logic into a wrapper function * chore: add new seeding process to admin test suite * chore(deps): upgrade jest and playwright * chore: make sure mongoose-specific tests are not skipped * chore: fix point test, which was depending on another test (that's bad!) * chore: fix incorrect import * chore: remove unnecessary comments * chore: clearly label lexicalE2E test file as todo * chore: simplify seed logic * chore: move versions test suite to new seed system
36 lines
1005 B
TypeScript
36 lines
1005 B
TypeScript
import path from 'path'
|
|
|
|
import { buildConfigWithDefaults } from '../buildConfigWithDefaults'
|
|
import AutosavePosts from './collections/Autosave'
|
|
import DraftPosts from './collections/Drafts'
|
|
import Posts from './collections/Posts'
|
|
import VersionPosts from './collections/Versions'
|
|
import AutosaveGlobal from './globals/Autosave'
|
|
import DraftGlobal from './globals/Draft'
|
|
import { clearAndSeedEverything } from './seed'
|
|
|
|
export default buildConfigWithDefaults({
|
|
collections: [Posts, AutosavePosts, DraftPosts, VersionPosts],
|
|
globals: [AutosaveGlobal, DraftGlobal],
|
|
indexSortableFields: true,
|
|
localization: {
|
|
defaultLocale: 'en',
|
|
locales: ['en', 'es'],
|
|
},
|
|
admin: {
|
|
webpack: (config) => ({
|
|
...config,
|
|
resolve: {
|
|
...config.resolve,
|
|
alias: {
|
|
...config?.resolve?.alias,
|
|
fs: path.resolve(__dirname, './mocks/emptyModule.js'),
|
|
},
|
|
},
|
|
}),
|
|
},
|
|
onInit: async (payload) => {
|
|
await clearAndSeedEverything(payload)
|
|
},
|
|
})
|