Add category level and turn the reticle into a background watermark
This commit is contained in:
@@ -13,15 +13,23 @@ describe('Payload API', () => {
|
||||
|
||||
it('má nadefinované všechny kolekce', () => {
|
||||
const slugy = Object.keys(payload.collections)
|
||||
expect(slugy).toEqual(expect.arrayContaining(['products', 'media', 'pages', 'users']))
|
||||
expect(slugy).toEqual(
|
||||
expect.arrayContaining(['products', 'categories', 'media', 'pages', 'users']),
|
||||
)
|
||||
})
|
||||
|
||||
it('umí založit a najít položku nabídky', async () => {
|
||||
const kategorie = await payload.create({
|
||||
collection: 'categories',
|
||||
data: { nazev: 'Zbraně' },
|
||||
})
|
||||
expect(kategorie.slug).toBe('zbrane')
|
||||
|
||||
const vytvorena = await payload.create({
|
||||
collection: 'products',
|
||||
data: {
|
||||
nazev: 'CZ 75 SP-01 Shadow',
|
||||
kategorie: 'zbrane',
|
||||
kategorie: kategorie.id,
|
||||
cena: 28900,
|
||||
stav: 'skladem',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user