-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(plugin-multi-tenant): test suite enhancements (#10732)
### What? Updates test suite multi-tenant config as a better example. ### Why? So it is easier to follow and write logical tests for in the future.
- Loading branch information
1 parent
be2c482
commit 9a87699
Showing
15 changed files
with
232 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import type { CollectionConfig } from 'payload' | ||
|
||
import { menuSlug } from '../shared.js' | ||
|
||
export const Menu: CollectionConfig = { | ||
slug: menuSlug, | ||
admin: { | ||
useAsTitle: 'title', | ||
}, | ||
fields: [ | ||
{ | ||
name: 'title', | ||
label: 'Title', | ||
type: 'text', | ||
required: true, | ||
}, | ||
{ | ||
name: 'description', | ||
type: 'textarea', | ||
}, | ||
{ | ||
name: 'menuItems', | ||
label: 'Menu Items', | ||
type: 'array', | ||
fields: [ | ||
{ | ||
name: 'menuItem', | ||
label: 'Menu Item', | ||
type: 'relationship', | ||
relationTo: 'menu-items', | ||
required: true, | ||
admin: { | ||
description: 'Automatically filtered by selected tenant', | ||
}, | ||
}, | ||
{ | ||
name: 'active', | ||
type: 'checkbox', | ||
}, | ||
], | ||
}, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import type { CollectionConfig } from 'payload' | ||
|
||
import { menuItemsSlug } from '../shared.js' | ||
|
||
export const MenuItems: CollectionConfig = { | ||
slug: menuItemsSlug, | ||
admin: { | ||
useAsTitle: 'name', | ||
}, | ||
fields: [ | ||
{ | ||
name: 'name', | ||
type: 'text', | ||
required: true, | ||
}, | ||
], | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.