chore: reduce getParentLabel logic and update test
This commit is contained in:
@@ -158,7 +158,7 @@ describe('Array', () => {
|
||||
|
||||
await page.click('#action-save')
|
||||
await expect(page.locator('.payload-toast-container')).toContainText(
|
||||
'The following field is invalid: Nested Array With Labels 1 > First Child Array 1 > Second Child Array 1 > Child Without Label 1 > Custom Text Label',
|
||||
'The following field is invalid: Parent Array Label 1 > First Child Array Label 1 > Second Child Array Label 1 > Child Without Label 1 > Custom Text Label',
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
@@ -263,10 +263,7 @@ const ArrayFields: CollectionConfig = {
|
||||
{
|
||||
name: 'nestedArrayWithLabels',
|
||||
type: 'array',
|
||||
labels: {
|
||||
singular: 'Nested Array With Labels',
|
||||
plural: 'Nested Arrays With Labels',
|
||||
},
|
||||
label: 'Parent Array Label',
|
||||
fields: [
|
||||
{
|
||||
name: 'firstChildArray',
|
||||
|
||||
Reference in New Issue
Block a user