* 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
81 lines
1.6 KiB
TypeScript
81 lines
1.6 KiB
TypeScript
import type { CollectionConfig } from '../../../../packages/payload/src/collections/config/types'
|
|
|
|
import { rowFieldsSlug } from '../../slugs'
|
|
|
|
const RowFields: CollectionConfig = {
|
|
slug: rowFieldsSlug,
|
|
versions: true,
|
|
admin: {
|
|
defaultColumns: ['title', 'id'],
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'id',
|
|
label: 'Custom ID',
|
|
type: 'text',
|
|
required: true,
|
|
},
|
|
{
|
|
type: 'row',
|
|
fields: [
|
|
{
|
|
name: 'title',
|
|
label: 'Title within a row',
|
|
type: 'text',
|
|
required: true,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
type: 'row',
|
|
fields: [
|
|
{
|
|
name: 'field_with_width_a',
|
|
label: 'Field with 50% width',
|
|
type: 'text',
|
|
admin: {
|
|
width: '50%',
|
|
},
|
|
},
|
|
{
|
|
name: 'field_with_width_b',
|
|
label: 'Field with 50% width',
|
|
type: 'text',
|
|
admin: {
|
|
width: '50%',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
type: 'row',
|
|
fields: [
|
|
{
|
|
label: 'Collapsible within a row',
|
|
type: 'collapsible',
|
|
fields: [
|
|
{
|
|
name: 'field_within_collapsible_a',
|
|
label: 'Field within collapsible',
|
|
type: 'text',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
label: 'Collapsible within a row',
|
|
type: 'collapsible',
|
|
fields: [
|
|
{
|
|
name: 'field_within_collapsible_b',
|
|
label: 'Field within collapsible',
|
|
type: 'text',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
],
|
|
}
|
|
|
|
export default RowFields
|