feat: relation field and picker
This commit is contained in:
1 parent
b45c99be3b
commit
37a77c9c22
92 files changed
+6826
-80
No files matched your search
@@ -50,9 +50,10 @@ function mediaField(rest: object = {}) {
|
||||
const media = ENTRY_EDITORS.media
|
||||
|
||||
describe('media in the registry', () => {
|
||||
it('is the seventh type, after select', () => {
|
||||
expect(FIELD_TYPES).toHaveLength(7)
|
||||
it('is the seventh type, after select and before relation', () => {
|
||||
expect(FIELD_TYPES).toHaveLength(8)
|
||||
expect(FIELD_TYPES[6]).toBe('media')
|
||||
expect(FIELD_TYPES[7]).toBe('relation')
|
||||
expect(FIELD_TYPES[5]).toBe('select')
|
||||
})
|
||||
|
||||
@@ -82,7 +83,7 @@ describe('media in the registry', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it.each(FIELD_TYPES.filter((type) => type !== 'media'))(
|
||||
it.each(FIELD_TYPES.filter((type) => type !== 'media' && type !== 'relation'))(
|
||||
'%s keeps its builder options and has no hint',
|
||||
(type) => {
|
||||
const spec = fieldTypeSpec(type)
|
||||
@@ -374,6 +375,7 @@ describe('media in the schema builder', () => {
|
||||
min: null,
|
||||
max: null,
|
||||
options: [],
|
||||
relation: null,
|
||||
})
|
||||
expect(payloadField({ ...field, required: true }).required).toBe(true)
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user